Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SimpleGameMenu

[19:7] extends: FXGLMenu

Wraps FXGL's SimpleGameMenu (com.almasb.fxgl.app.scene.SimpleGameMenu), a minimal in-game pause menu with just Resume and Exit (or Exit-to-main-menu when GameSettings.isMainMenuEnabled is true). Uses /assets/textures/pause_menu_bg.png as the background image. Always built as a GAME_MENU; return one from a SceneFactory override of newGameMenu to use it in place of the default menu.

Methods

  • SimpleGameMenu (bool Construct = true)

    Creates a new SimpleGameMenu. Pass false to construct an empty wrapper for adopt; the default (true) actually instantiates the FXGL class, which requires a running engine and the pause_menu_bg.png asset.

    • @p Construct is true to instantiate immediately, false for an empty wrapper.
  • adopt (object Ajo)

    Wraps an existing SimpleGameMenu AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a SimpleGameMenu.
    • @r A new wrapper.