Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: FxObj
Wraps FXGL's MouseTrigger (com.almasb.fxgl.input.MouseTrigger), a data class pairing a MouseButton with an optional InputModifier. MouseTrigger implements the Trigger interface and is the mouse-side counterpart to KeyTrigger.
MouseTrigger (string ButtonName = "PRIMARY", string ModifierName = "NONE")
Creates a new MouseTrigger from a MouseButton name plus an optional modifier.
ButtonName is the MouseButton enum name ("PRIMARY", "SECONDARY", "MIDDLE", "BACK", "FORWARD").ModifierName is the InputModifier name. Defaults to "NONE".adopt (object Ajo)
Wraps an existing MouseTrigger AussomJavaObject.
Ajo is an AussomJavaObject around a MouseTrigger.A new wrapper.getName ()
Returns the FXGL short-form name (e.g. "LMB", "CTRL+RMB").
getButton ()
Returns the MouseButton AussomJavaObject.
getModifier ()
Returns the InputModifier AussomJavaObject.
isKey ()
Returns false (MouseTrigger is never key-typed).
isButton ()
Returns true (MouseTrigger is always button-typed).
isTriggered (object EventObj)
Returns true when the given JavaFX InputEvent matches the button and modifier of this trigger.
EventObj is an AussomJavaObject around an InputEvent.A bool.isReleased (object EventObj)
Returns true when the given JavaFX InputEvent matches a release of this trigger.
EventObj is an AussomJavaObject around an InputEvent.A bool.buttonFromString (string Value)
Static helper: maps a button short-form string ("LMB", "MMB", "RMB", "BMB", "FMB") to the JavaFX MouseButton.
Value is the short-form string.An AussomJavaObject around a MouseButton.buttonToString (object ButtonObj)
Static helper: maps a MouseButton to its FXGL short-form string ("LMB", etc.).
ButtonObj is an AussomJavaObject around a MouseButton.A string.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.