Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: InGamePanel

[14:7] extends: Pane

Wraps FXGL's InGamePanel, a semi-transparent slide-in panel used for HUD overlays (inventory, settings, stats). The panel slides in horizontally from the chosen side (LEFT or RIGHT) when open is called, and slides out on close.

Methods

  • InGamePanel (double Width, double Height, string DirectionName = "LEFT")

    Creates a new InGamePanel of the given size, sliding from the given direction ("LEFT" or "RIGHT").

    • @p Width is the panel width in pixels.
    • @p Height is the panel height in pixels.
    • @p DirectionName is the horizontal slide direction.
  • open ()

    Opens the panel (slides in).

    • @r this object
  • close ()

    Closes the panel (slides out).

    • @r this object
  • isOpen ()

    Returns whether the panel is currently open.

    • @r A bool.
  • getPanelWidth ()

    Returns the panel width in pixels.

  • getPanelHeight ()

    Returns the panel height in pixels.

  • getDirection ()

    Returns the slide-in direction name ("LEFT" or "RIGHT").