Basics
Guides
API Reference
Basics
Guides
API Reference
[27:7] extends: FxObj
Wraps an AussomSceneFactory (subclass of FXGL's SceneFactory) so Aussom code can override any of the five engine scene factories: newStartup, newIntro, newLoadingScene, newMainMenu, newGameMenu. Each on* method registers an Aussom callback that returns a scene wrapper (or AussomJavaObject) of the matching type; when the callback is unset, FXGL's default scene is used. Install the resulting factory on GameSettings before launch: sf = new SceneFactory(); sf.onMainMenu(::buildMainMenu); settings.setSceneFactory(sf.obj); The onStartupScene callback receives (width, height); the other callbacks take no arguments.
SceneFactory ()
Creates a new SceneFactory bridge ready to receive on* callbacks.
adopt (object Ajo)
Wraps an existing AussomSceneFactory AussomJavaObject.
Ajo is an AussomJavaObject around an AussomSceneFactory.A new wrapper.onStartupScene (callback Cb)
Registers the callback that builds the startup scene. The callback receives (width, height) and must return a StartupScene wrapper (or AussomJavaObject around a StartupScene). Returning null falls back to the engine default (FXGLStartupScene).
Cb is a callback (int width, int height) -> StartupScene.this objectonIntroScene (callback Cb)
Registers the callback that builds the intro scene. The callback takes no arguments and must return an IntroScene wrapper. Returning null falls back to the engine default (FXGLIntroScene).
Cb is a callback () -> IntroScene.this objectonLoadingScene (callback Cb)
Registers the callback that builds the loading scene. The callback takes no arguments and must return a LoadingScene wrapper. Returning null falls back to the engine default (FXGLLoadingScene).
Cb is a callback () -> LoadingScene.this objectonMainMenu (callback Cb)
Registers the callback that builds the main menu. The callback takes no arguments and must return an FXGLMenu wrapper (FXGLDefaultMenu, SimpleGameMenu, or a custom subclass). Returning null falls back to FXGLDefaultMenu(MAIN_MENU).
Cb is a callback () -> FXGLMenu.this objectonGameMenu (callback Cb)
Registers the callback that builds the in-game pause menu. The callback takes no arguments and must return an FXGLMenu wrapper. Returning null falls back to FXGLDefaultMenu(GAME_MENU).
Cb is a callback () -> FXGLMenu.this objectnewStartup (int Width, int Height)
Triggers the startup-scene factory with the given window size. Returns whatever the on-startup callback produced (typically a StartupScene AJO), or the engine default when no callback is registered.
newIntro ()
Triggers the intro-scene factory.
newLoadingScene ()
Triggers the loading-scene factory.
newMainMenu ()
Triggers the main-menu factory.
newGameMenu ()
Triggers the game-menu factory.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.