Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: KeyView

[16:7] extends: StackPane

Wraps FXGL's KeyView (com.almasb.fxgl.input.view.KeyView), a StackPane that renders a pretty key glyph (e.g. "[W]", arrow shapes, shift / enter symbols) for tutorial overlays and rebind UIs.

Methods

  • KeyView (string KeyName, object ColorObj = null, double Size = 24.0)

    Creates a new KeyView for the given KeyCode name, color and size.

    • @p KeyName is the KeyCode enum name.
    • @p ColorObj is a Color wrapper for the foreground.
    • @p Size is the base glyph size in pixels.
  • getKeyColor ()

    Returns the key glyph fill color.

  • setKeyColor (object ColorObj)

    Sets the key glyph fill color.

  • getBackgroundColor ()

    Returns the key glyph background fill.

  • setBackgroundColor (object ColorObj)

    Sets the key glyph background fill.

  • keyColorProperty ()

    Returns the underlying ObjectProperty for the key color so callers can bind it.

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

    Returns the underlying ObjectProperty for the background color.

    • @r An AussomJavaObject around an ObjectProperty.