Class GGInventoryActionStrategyDefault extends GGInventoryActionStrategy

Default implementation of handling player input when interacting with inventory slots.

The default action strategy handles user input for the [GGInventoryController]. It defines configurable settings for mouse input and other actions. You can define what actions left click, double-click, right-click, and middle-click perform, and also whether focus_follows_mouse.

An action map determines which actions to use for using, dropping, transferring, splitting, and dragging items. These actions should match the actions created in the Project Settings Input Map.
Take no action.
Actions.DO_NOTHING = 0
Tells the [GGInventoryController] to use an item.
Actions.USE_ITEM = 1
Tells the [GGInventoryController] to drop the item.
Actions.DROP_ITEM = 2
Tells the [GGInventoryController] to transfer the item.
Actions.TRANSFER_ITEM = 3
Tells the [GGInventoryController] to split an item stack in half.
Actions.SPLIT_ITEM = 4

# Members

## The action to taken when left-clicking the mouse button.
var mouse_left_click: int = 0
## The action to take when double clicking the mouse button.
var mouse_double_click: int = 1
## The action to take when the right mouse button is pressed.
var mouse_right_click: int = 2
## The action to take when the middle mouse button is pressed.
var mouse_middle_click: int = 4
## The [InputMap] action for using an inventory item.
var action_use_item: String = "inventory_use_item"
## The [InputMap] action for dropping an inventory item.
var action_drop_item: String = "inventory_drop_item"
## The [InputMap] action for transferring an inventory item to another inventory.
var action_transfer_item: String = "inventory_transfer_item"
## The [InputMap] action for splitting an inventory item.
var action_split_item: String = "inventory_split_item"
## Automatically focuses the slot the mouse is hovering over.
var focus_follows_mouse: bool = false
## When enabled, calls [method Viewport.set_input_as_handled] to prevent [InputEvent] from propagating further.
var set_input_as_handled: bool = true

# Methods

## Called by the [param controller] for each [InputEvent] the slot described by [param event_args] receives. If [member set_input_as_handled] is enabled, [method Viewport.set_input_as_handled] is called to mark the event as handled.
func on_slot_gui_input(controller: GGInventoryControllerevent_args: GGInventoryEventArgs) -> void
## Called when an inventory slot described by [param event_args] is focused.
func on_focus_entered(controller: GGInventoryControllerevent_args: GGInventoryEventArgs) -> void
## Called when an inventory slot described by [param event_args] loses focus.
func on_focus_exited(controller: GGInventoryControllerevent_args: GGInventoryEventArgs) -> void
## Called when the mouse hovers over the inventory slot described by [param event_args].
func on_mouse_entered(controller: GGInventoryControllerevent_args: GGInventoryEventArgs) -> void