[21:7] extends: FxObj
Wraps FXGL's Input, the service that binds keyboard, mouse, and virtual-controller triggers to UserActions. Aussom users construct actions through UserAction, then register them via addActionKey / addActionMouse with the desired trigger and optional InputModifier. Aussom users normally obtain the live Input from fxgl.getInput in chunk 6; this wrapper exists for direct construction in tests and for users that hold an FXGL Input through AJI.
Input (Ajo = null)
Creates an Input wrapper. With no argument constructs a new FXGL Input; with an AussomJavaObject wraps the supplied existing FXGL Input (used by fxgl.getInput to hand back a ready-to-use wrapper).
Ajo is an optional AussomJavaObject around an FXGL Input.adopt (object Ajo)
Wraps an existing Input AussomJavaObject.
Ajo is an AussomJavaObject around an FXGL Input.A new wrapper.addActionKey (object Action, string KeyName, string ModifierName = "NONE")
Binds a UserAction to a keyboard trigger.
Action is a UserAction wrapper.KeyName is the KeyCode constant name (e.g. "SPACE", "A").ModifierName is an optional InputModifier name ("NONE", "CTRL", "SHIFT", "ALT"). Defaults to "NONE".this objectaddActionMouse (object Action, string ButtonName, string ModifierName = "NONE")
Binds a UserAction to a mouse-button trigger.
Action is a UserAction wrapper.ButtonName is the MouseButton constant name (e.g. "PRIMARY").ModifierName is an optional InputModifier name. Defaults to "NONE".this objectrebindKey (object Action, string KeyName, string ModifierName = "NONE")
Rebinds an already-registered action to a new keyboard trigger.
Action is a UserAction wrapper.KeyName is the new KeyCode constant name.ModifierName is an optional InputModifier name.this objectgetActionByName (string Name)
Returns the action with the given name.
Name is the action name.An AussomJavaObject wrapping a UserAction.getTriggerName (string ActionName)
Returns the trigger name string currently bound to the given action (useful for displaying rebind UIs).
ActionName is the action name.A string with the trigger name.clearAll ()
Removes every registered action.
this objectupdate (double Tpf)
Drives input processing one tick forward. Normally called by the scene; available for manual control.
Tpf is the elapsed time in seconds.this objectmockKeyPress (string KeyName, string ModifierName = "NONE")
Synthesizes a key-press event for the given KeyCode with an optional modifier. Used in tests and synthetic-input flows to fire bound UserActions without a physical keyboard.
KeyName is the KeyCode constant name (e.g. "SPACE", "A").ModifierName is the InputModifier name ("NONE", "CTRL", "SHIFT", "ALT"). Defaults to "NONE".this objectmockKeyRelease (string KeyName, string ModifierName = "NONE")
Synthesizes a key-release event for the given KeyCode with an optional modifier.
KeyName is the KeyCode constant name.ModifierName is the InputModifier name. Defaults to "NONE".this objectmockButtonPress (string ButtonName, string ModifierName = "NONE", double Gx = -1.0, double Gy = -1.0)
Synthesizes a mouse-button-press event with optional modifier and optional game-space coordinates. When Gx / Gy are negative (defaults), FXGL uses the current mouse position.
ButtonName is the MouseButton name ("PRIMARY", "SECONDARY", "MIDDLE").ModifierName is the InputModifier name. Defaults to "NONE".Gx is an optional game-X coordinate.Gy is an optional game-Y coordinate.this objectmockButtonRelease (string ButtonName, string ModifierName = "NONE", double Gx = -1.0, double Gy = -1.0)
Synthesizes a mouse-button-release event with optional modifier and game-space coordinates. See mockButtonPress for the position handling.
ButtonName is the MouseButton name.ModifierName is the InputModifier name.Gx is an optional game-X coordinate.Gy is an optional game-Y coordinate.this objectmockTriggerPress (object TriggerObj)
Synthesizes a trigger press for an arbitrary Trigger (KeyTrigger or MouseTrigger). Useful for higher-level mock flows where the caller already has a Trigger object.
TriggerObj is an AussomJavaObject around a Trigger.this objectmockTriggerRelease (object TriggerObj)
Synthesizes a trigger release for an arbitrary Trigger.
TriggerObj is an AussomJavaObject around a Trigger.this objectsetProcessInput (bool Enabled)
Sets whether input processing is active. When false, bound UserActions stop firing -- useful for pause overlays.
Enabled is a bool.this objectgetProcessInput ()
Returns whether input processing is currently active.
A bool.setRegisterInput (bool Enabled)
Sets whether new input events are registered with Input. When false, key / mouse events are dropped entirely.
Enabled is a bool.this objectgetRegisterInput ()
Returns whether input registration is currently active.
A bool.setDoublePressTimeThreshold (double Seconds)
Sets the double-press time threshold in seconds.
Seconds is the threshold in seconds.this objectgetDoublePressTimeThreshold ()
Returns the current double-press time threshold in seconds.
A double.triggerNameProperty (object Action)
Returns the read-only property holding the trigger-name string for the given action. Bind a Label.textProperty to this so a rebind UI updates live.
Action is a UserAction wrapper.An AussomJavaObject around a ReadOnlyStringProperty, or null if the action is not bound.triggerProperty (object Action)
Returns the read-only property holding the live Trigger for the given action.
Action is a UserAction wrapper.An AussomJavaObject around a ReadOnlyObjectProperty.getAllBindings ()
Returns an AussomJavaObject around the read-only map of action -> InputBinding currently registered. Useful for drawing a rebind UI that lists every action.
An AussomJavaObject around a Map.getMouseXWorld ()
Returns the current mouse X position in world coordinates.
A double.getMouseYWorld ()
Returns the current mouse Y position in world coordinates.
A double.getMouseXUI ()
Returns the current mouse X position in UI (screen-overlay) coordinates.
A double.getMouseYUI ()
Returns the current mouse Y position in UI (screen-overlay) coordinates.
A double.getVectorToMouse (double Fx, double Fy)
Returns the vector from the given game position to the mouse cursor (in world coordinates) as a Point2D AussomJavaObject. Aussom code can read components via .invoke("getX") / .invoke("getY") on the result.
Fx is the source X.Fy is the source Y.An AussomJavaObject around a javafx.geometry.Point2D.getVectorFromMouse (double Fx, double Fy)
Returns the vector from the mouse cursor to the given game position (the negative of getVectorToMouse).
Fx is the target X.Fy is the target Y.An AussomJavaObject around a javafx.geometry.Point2D.getMousePositionWorld ()
Returns the current mouse position in world coordinates as a Point2D AussomJavaObject. Read components via .invoke("getX") / .invoke("getY").
An AussomJavaObject around a javafx.geometry.Point2D.getMousePositionUI ()
Returns the current mouse position in UI (screen-overlay) coordinates as a Point2D AussomJavaObject.
An AussomJavaObject around a javafx.geometry.Point2D.pressVirtual (string ButtonName)
Drives a virtual button press, as if the on-screen controller's button was pressed.
ButtonName is the VirtualButton enum name ("A", "B", "X", "Y", "LB", "RB", "UP", "DOWN", "LEFT", "RIGHT").this objectreleaseVirtual (string ButtonName)
Drives a virtual button release.
ButtonName is the VirtualButton enum name.this objectcreateVirtualJoystick ()
Builds an on-screen virtual joystick.
An AussomJavaObject around a VirtualJoystick (a Group).createVirtualDpadView ()
Builds an on-screen virtual D-pad view.
An AussomJavaObject around a Group containing the D-pad.createXboxVirtualControllerView ()
Builds an Xbox-style on-screen controller view.
An AussomJavaObject around a Group.createPSVirtualControllerView ()
Builds a PlayStation-style on-screen controller view.
An AussomJavaObject around a Group.createVirtualMenuKeyView (string KeyName, bool MenuEnabled = false)
Builds an on-screen menu key.
KeyName is the KeyCode enum name to fire when tapped.MenuEnabled is whether to fire the engine menu key.An AussomJavaObject around a Node.startCapture ()
Starts recording an InputCapture for later replay.
An AussomJavaObject around the InputCapture.stopCapture ()
Stops an in-progress capture session.
this objectapplyCapture (object CaptureObj)
Replays a previously captured InputCapture.
CaptureObj is an AussomJavaObject around an InputCapture.this objectisIllegal (string KeyName)
Static helper: returns whether the given KeyCode is reserved by FXGL and cannot be used as a trigger.
KeyName is the KeyCode enum name.A bool.addEventFilter (object EventTypeObj, object HandlerObj)
Adds a raw JavaFX event filter to Input's pipeline.
EventTypeObj is an AussomJavaObject around an EventType.HandlerObj is an AussomJavaObject around an EventHandler.this objectremoveEventFilter (object EventTypeObj, object HandlerObj)
Removes a raw JavaFX event filter.
EventTypeObj is an AussomJavaObject around an EventType.HandlerObj is an AussomJavaObject around an EventHandler.this objectaddEventHandler (object EventTypeObj, object HandlerObj)
Adds a raw JavaFX event handler to Input's pipeline.
EventTypeObj is an AussomJavaObject around an EventType.HandlerObj is an AussomJavaObject around an EventHandler.this objectremoveEventHandler (object EventTypeObj, object HandlerObj)
Removes a raw JavaFX event handler.
EventTypeObj is an AussomJavaObject around an EventType.HandlerObj is an AussomJavaObject around an EventHandler.this objectfireEventViaFilters (object EventObj)
Fires an event through Input's filter chain.
EventObj is an AussomJavaObject around the Event.this objectfireEventViaHandlers (object EventObj)
Fires an event through Input's handler chain.
EventObj is an AussomJavaObject around the Event.this objectaddTriggerListener (object ListenerObj)
Adds a TriggerListener to Input. Users that need a custom TriggerListener subclass can build one through aji and pass it here.
ListenerObj is an AussomJavaObject around a TriggerListener.this objectremoveTriggerListener (object ListenerObj)
Removes a TriggerListener.
ListenerObj is an AussomJavaObject around a TriggerListener.this objectrebindMouse (object Action, string ButtonName, string ModifierName = "NONE")
Rebinds an already-registered action to a mouse button.
Action is a UserAction wrapper.ButtonName is the MouseButton enum name.ModifierName is the InputModifier name. Defaults to "NONE".this objectmouseXWorldProperty ()
Returns the world-space mouse X ReadOnlyDoubleProperty.
mouseYWorldProperty ()
Returns the world-space mouse Y ReadOnlyDoubleProperty.
mouseXUIProperty ()
Returns the UI-space mouse X ReadOnlyDoubleProperty.
mouseYUIProperty ()
Returns the UI-space mouse Y ReadOnlyDoubleProperty.
onKeyEvent (object KeyEventAjo)
Dispatches a JavaFX KeyEvent through the Input pipeline. Exposed for test harnesses and custom event-source code.
onMouseEvent (object DataAjo)
Dispatches a FXGL MouseEventData through the Input pipeline.