Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: MouseButtonView

[20:7] extends: Pane

Wraps FXGL's MouseButtonView (com.almasb.fxgl.input.view.MouseButtonView), a Pane that renders a pretty mouse-button glyph for tutorials and rebind UIs. Only PRIMARY and SECONDARY buttons are supported by the underlying view; passing MIDDLE / BACK / FORWARD raises an exception inside FXGL.

Methods

  • MouseButtonView (string ButtonName = "PRIMARY", object ColorObj = null, double Size = 24.0)

    Creates a new MouseButtonView for the given MouseButton name (PRIMARY or SECONDARY), color and size.

    • @p ButtonName is the MouseButton enum name.
    • @p ColorObj is a Color wrapper for the highlight color.
    • @p Size is the base glyph size in pixels.
  • getColor ()

    Returns the highlight color.

  • setColor (object ColorObj)

    Sets the highlight color.

  • getBackgroundColor ()

    Returns the background color.

  • setBackgroundColor (object ColorObj)

    Sets the background color.

  • colorProperty ()

    Returns the highlight color as a bindable ObjectProperty.

    • @r An AussomJavaObject around an ObjectProperty.