Documentation ¶
Overview ¶
Package InputMap provides methods for working with InputMap object instances.
Index ¶
- func ActionAddEvent(action string, event [1]gdclass.InputEvent)
- func ActionEraseEvent(action string, event [1]gdclass.InputEvent)
- func ActionEraseEvents(action string)
- func ActionGetDeadzone(action string) Float.X
- func ActionGetEvents(action string) [][1]gdclass.InputEvent
- func ActionHasEvent(action string, event [1]gdclass.InputEvent) bool
- func ActionSetDeadzone(action string, deadzone Float.X)
- func AddAction(action string)
- func Advanced() class
- func EraseAction(action string)
- func EventIsAction(event [1]gdclass.InputEvent, action string) bool
- func GetActions() []string
- func HasAction(action string) bool
- func LoadFromProjectSettings()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionAddEvent ¶
func ActionAddEvent(action string, event [1]gdclass.InputEvent)
Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
func ActionEraseEvent ¶
func ActionEraseEvent(action string, event [1]gdclass.InputEvent)
Removes an [InputEvent] from an action.
func ActionGetDeadzone ¶
Returns a deadzone value for the action.
func ActionGetEvents ¶
func ActionGetEvents(action string) [][1]gdclass.InputEvent
Returns an array of [InputEvent]s associated with a given action. [b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the [code]input/*[/code] settings from [ProjectSettings].
func ActionHasEvent ¶
func ActionHasEvent(action string, event [1]gdclass.InputEvent) bool
Returns [code]true[/code] if the action has the given [InputEvent] associated with it.
func ActionSetDeadzone ¶
Sets a deadzone value for the action.
func AddAction ¶
func AddAction(action string)
Adds an empty action to the [InputMap] with a configurable [param deadzone]. An [InputEvent] can then be added to this action with [method action_add_event].
func Advanced ¶
func Advanced() class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
func EventIsAction ¶
func EventIsAction(event [1]gdclass.InputEvent, action string) bool
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
func HasAction ¶
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
func LoadFromProjectSettings ¶
func LoadFromProjectSettings()
Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings].
Types ¶
This section is empty.