Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FXGLDefaultMenu

[20:7] extends: FXGLMenu

Wraps FXGL's FXGLDefaultMenu (com.almasb.fxgl.app.scene.FXGLDefaultMenu), the engine's built-in stylized main / game menu. Construction takes a MenuType (use MenuType.MAIN_MENU() or MenuType.GAME_MENU() as the underlying enum value) to select which menu body the instance renders. The default menu is wired automatically by the default SceneFactory. Construct one directly only when returning it from a custom SceneFactory override.

Methods

  • FXGLDefaultMenu (MenuTypeObj = null)

    Creates a new FXGLDefaultMenu of the given MenuType. Pass null to construct an empty wrapper for adopt.

    • @p MenuTypeObj is an AussomJavaObject around a MenuType enum value, or null.
  • adopt (object Ajo)

    Wraps an existing FXGLDefaultMenu AussomJavaObject.

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