-
Notifications
You must be signed in to change notification settings - Fork 0
InputMap
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.InputMap |
| Namespace | Electron2D |
| Kind | class |
| Category | Input |
Stores input actions and their input event bindings.
public static class Electron2D.InputMapProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: InputMap
Process-wide action registry with deadzones, keyboard/mouse/gamepad bindings, direct action matching and internal settings serialization.
An input action is a named command such as jump or
move_left. The map stores a deadzone and a set of keyboard, mouse or
direct action events for each action.
The map is process-wide in 0.1.0 Preview. Project-file persistence is handled by an internal serializer used by the future project settings layer, not by public file I/O methods on this type.
All methods synchronize access to the process-wide action registry. Returned arrays are snapshots and may be read from any thread.
This class is available since Electron2D 0.1.0 Preview.
Electron2D.InputElectron2D.InputEventAction
| Member | Kind | Summary |
|---|---|---|
ActionAddEvent(System.String, Electron2D.InputEvent) |
Method | Adds an input event binding to an action. |
ActionEraseEvent(System.String, Electron2D.InputEvent) |
Method | Removes one input event binding from an action. |
ActionEraseEvents(System.String) |
Method | Removes all input event bindings from an action. |
ActionGetDeadzone(System.String) |
Method | Gets the deadzone for an action. |
ActionGetEvents(System.String) |
Method | Gets the input event bindings for an action. |
ActionSetDeadzone(System.String, System.Single) |
Method | Sets the deadzone for an action. |
AddAction(System.String, System.Single) |
Method | Adds an action to the input map. |
EraseAction(System.String) |
Method | Removes an action and its events from the input map. |
EventIsAction(Electron2D.InputEvent, System.String, System.Boolean) |
Method | Checks whether an input event matches an action. |
GetActions() |
Method | Gets the registered action names. |
HasAction(System.String) |
Method | Checks whether an action exists. |
Kind: Method
public static System.Void ActionAddEvent(System.String, Electron2D.InputEvent)(System.String action, Electron2D.InputEvent inputEvent)Adds an input event binding to an action.
Duplicate bindings are ignored. The stored binding is copied, so later
mutations to inputEvent do not affect the map.
-
action: The action name to update. -
inputEvent: The input event binding to add.
-
System.ArgumentException: Thrown whenactionis empty, the action does not exist, or the event type cannot be used as an action binding. -
System.ArgumentNullException: Thrown wheninputEventisnull.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap.ActionEraseEvent(System.String,Electron2D.InputEvent)Electron2D.InputMap.ActionGetEvents(System.String)
Kind: Method
public static System.Void ActionEraseEvent(System.String, Electron2D.InputEvent)(System.String action, Electron2D.InputEvent inputEvent)Removes one input event binding from an action.
This method follows the validation and lifetime rules of its declaring type.
-
action: The action name to update. -
inputEvent: The input event binding to remove.
-
System.ArgumentException: Thrown whenactionis empty, the action does not exist, or the event type cannot be used as an action binding. -
System.ArgumentNullException: Thrown wheninputEventisnull.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap.ActionAddEvent(System.String,Electron2D.InputEvent)
Kind: Method
public static System.Void ActionEraseEvents(System.String)(System.String action)Removes all input event bindings from an action.
This method follows the validation and lifetime rules of its declaring type.
-
action: The action name to update.
-
System.ArgumentException: Thrown whenactionis empty or the action does not exist.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap
Kind: Method
public static System.Single ActionGetDeadzone(System.String)(System.String action)Gets the deadzone for an action.
This method follows the validation and lifetime rules of its declaring type.
-
action: The action name to query.
The action deadzone, or 0.0 when the action does not exist.
-
System.ArgumentException: Thrown whenactionis empty.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap.ActionSetDeadzone(System.String,System.Single)
Kind: Method
public static Electron2D.InputEvent[] ActionGetEvents(System.String)(System.String action)Gets the input event bindings for an action.
This method follows the validation and lifetime rules of its declaring type.
-
action: The action name to query.
A stable snapshot of copied input event bindings, or an empty array when the action does not exist.
-
System.ArgumentException: Thrown whenactionis empty.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap
Kind: Method
public static System.Void ActionSetDeadzone(System.String, System.Single)(System.String action, System.Single deadzone)Sets the deadzone for an action.
This method follows the validation and lifetime rules of its declaring type.
-
action: The action name to update. -
deadzone: The new deadzone in the range0.0through1.0.
-
System.ArgumentException: Thrown whenactionis empty, the action does not exist, ordeadzoneis not finite or outside the supported range.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap.ActionGetDeadzone(System.String)
Kind: Method
public static System.Void AddAction(System.String, System.Single)(System.String action, System.Single deadzone)Adds an action to the input map.
Re-adding an existing action leaves its deadzone and events unchanged.
-
action: The action name to add. -
deadzone: The action deadzone in the range0.0through1.0.
-
System.ArgumentException: Thrown whenactionis empty ordeadzoneis not finite or outside the supported range.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap
Kind: Method
public static System.Void EraseAction(System.String)(System.String action)Removes an action and its events from the input map.
Removing an unknown action is a no-op. Any runtime state tracked for the action is cleared as part of removal.
-
action: The action name to remove.
-
System.ArgumentException: Thrown whenactionis empty.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap
Kind: Method
public static System.Boolean EventIsAction(Electron2D.InputEvent, System.String, System.Boolean)(Electron2D.InputEvent inputEvent, System.String action, System.Boolean exactMatch)Checks whether an input event matches an action.
This method follows the validation and lifetime rules of its declaring type.
-
inputEvent: The input event to test. -
action: The action name to test against. -
exactMatch: Reserved for exact modifier/device matching in future input work.
true when the event matches the action and passes the action
deadzone; otherwise, false.
-
System.ArgumentException: Thrown whenactionis empty. -
System.ArgumentNullException: Thrown wheninputEventisnull.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Input.IsActionPressed(System.String,System.Boolean)
Kind: Method
public static System.String[] GetActions()()Gets the registered action names.
This method follows the validation and lifetime rules of its declaring type.
A stable, ordinally sorted array of action names.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap
Kind: Method
public static System.Boolean HasAction(System.String)(System.String action)Checks whether an action exists.
This method follows the validation and lifetime rules of its declaring type.
-
action: The action name to check.
true if the action exists; otherwise, false.
-
System.ArgumentException: Thrown whenactionis empty.
This method is safe to call from any thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.InputMap
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.