Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TriggerView

[16:7] extends: Pane

Wraps FXGL's TriggerView (com.almasb.fxgl.input.view.TriggerView), a Pane that renders a Trigger glyph and auto-updates when the underlying Trigger changes. Use to display a player-rebindable key/mouse binding ("press [E] to interact") that keeps in sync with the live binding.

Methods

  • TriggerView (object TriggerObj, object ColorObj = null, double Size = 24.0)

    Creates a new TriggerView for the given Trigger wrapper.

    • @p TriggerObj is a KeyTrigger / MouseTrigger wrapper (or any AussomJavaObject around a Trigger).
    • @p ColorObj is a Color wrapper for the foreground.
    • @p Size is the base glyph size in pixels.
  • getTrigger ()

    Returns the current Trigger as an AussomJavaObject.

    • @r An AussomJavaObject around a Trigger.
  • setTrigger (object TriggerObj)

    Replaces the displayed Trigger. The view re-renders automatically.

    • @p TriggerObj is a Trigger wrapper or raw AJO.
    • @r this object
  • getColor ()

    Returns the foreground color.

  • setColor (object ColorObj)

    Sets the foreground color.

  • triggerProperty ()

    Returns the trigger ObjectProperty so callers can bind it.

    • @r An AussomJavaObject around an ObjectProperty.
  • colorProperty ()

    Returns the color ObjectProperty so callers can bind it.

    • @r An AussomJavaObject around an ObjectProperty.
  • getSize ()

    Returns the view's size in pixels.

  • setSize (double V)

    Sets the view's size in pixels.