Class GGInventoryController extends Node

Displays inventory slots and coordinates player input.

The controller implements functionality using an MVC-style approach. The controller reacts to inventory changes (the model) to update the item slots (the view) and handles input events from the slots to call inventory functionality.

User input is handled by the action_strategy and dnd_strategy.

This class implements (abstract) base functionality and should not be used directly. The [GGInventoryManagedSlotsController] manages slots ([Control]s), while the [GGInventoryAssignedSlotsController] updates slots managed externally.

# Signals

## Emitted when the [member inventory] is resized.
signal inventory_resized(slot_count: int)
## Emitted when the [member inventory] is destroyed.
signal inventory_destroyed
signal gui_input_slot(event_args: GGInventoryEventArgs)
signal mouse_entered_slot(event_args: GGInventoryEventArgs)
signal mouse_exited_slot(event_args: GGInventoryEventArgs)
signal focus_entered_slot(event_args: GGInventoryEventArgs)
signal focus_exited_slot(event_args: GGInventoryEventArgs)
signal item_dragged(event_args: GGInventoryEventArgs)
signal item_dropped(event_args: GGInventoryEventArgs)
signal transfer_item_requested(slot_id: int)
signal split_item_requested(slot_id: int)

# Members

## The Inventory we're displaying the contents of
var inventory: GGInventory = null
## The action strategy handles input, mouse, and focus events from slots.
var action_strategy: GGInventoryActionStrategy
## The drag-and-drop handling is implemented as strategy to allow for game-specific configuration of the behavior.
var dnd_strategy: GGInventoryDndStrategy
## Determines how a request to split an item should be interpreted.
var split_strategy: GGInventorySplitStrategy
## the filter strategy
var search_strategy: GGInventorySearchStrategy
## Filters the items according to the [member search_strategy].
var search: String = ""
## Handles the drag-and-drop interactions with the inventory slots.
var dragon_drop: GGDragonDrop
## The context that's interacting with the inventory.
var context_id: int = 0

# Methods

## Uses the item in [param slot_id].
func use_item(slot_id: int) -> void
## Drops the item in [param slot_id].
func drop_item(slot_id: int) -> void
## Splits the item in [param slot_id]. [br][br]If a [member split_strategy] is defined, it'll handle splitting the item. Otherwise, the [signal split_item_requested] signal is emitted.
func split_item(slot_id: int) -> void
func transfer_item(slot_id: int) -> void
## Retrieves the [GGItemData] from the [param slot_id].
func get_item(slot_id: int) -> GGItemData
## Retrieves the slot ID from the [param slot] node. [br][br][b]Note: This abstract class only returns [code]-1[/code].[/b]
func get_slot_id(slot: Control) -> int
## Retrieves the slot by its [param slot_id]. [br][br][b]Note: This abstract class only returns [code]null[/code].[/b]
func get_slot(slot_id: int) -> Control
## Retrieves all slots. [br][br][b]Note: This abstract class only returns empty array.[/b]
func get_slots() -> Array[Control]
## Refreshes all item slots.
func refresh_slots() -> void