FlixelLwjgl3Launcher
View sourceclass
org.flixelgdx.backend.lwjgl3.FlixelLwjgl3Launcher
Launches the desktop (LWJGL3) version of the Flixel game.
Constructors
FlixelLwjgl3Launcher()
Methods
launch(FlixelGame)
Launches the LWJGL3 version of the Flixel game in RELEASE mode with a default configuration. This should be called from the main method of the libGDX LWJGL3 launcher class.
Parameters:
| Name | Description |
|---|---|
game | The game instance to launch. |
launch(FlixelGame, String...)
Launches the LWJGL3 version of the Flixel game in RELEASE mode with a default configuration and the given window icons.
Parameters:
| Name | Description |
|---|---|
game | The game instance to launch. |
icons | Window icon paths. Make sure your icons actually exist and are valid! |
launch(FlixelGame, FlixelRuntimeMode, String...)
Launches the LWJGL3 version of the Flixel game with the given runtime mode and a default configuration built from the game's own settings.
Parameters:
| Name | Description |
|---|---|
game | The game instance to launch. |
runtimeMode | The FlixelRuntimeMode for this session (TEST, DEBUG, or RELEASE). |
icons | Window icon paths. Make sure your icons actually exist and are valid! |
launch(FlixelGame, FlixelRuntimeMode, Runnable)
Launches the LWJGL3 version of the Flixel game with the given runtime mode, a default configuration, and an optional pre-initialization callback.
Use this when you want to inject custom services (e.g. a custom debug overlay) without supplying a full configuration object. The configuration is built from the game's own settings exactly as FlixelLwjgl3Launcher.buildDefaultConfig(FlixelGame, String...) would produce it.
FlixelLwjgl3Launcher.launch(game, FlixelRuntimeMode.DEBUG, () -> {
Flixel.setDebugOverlay(MyCustomOverlay::new);
});
Parameters:
| Name | Description |
|---|---|
game | The game instance to launch. |
runtimeMode | The FlixelRuntimeMode for this session (TEST, DEBUG, or RELEASE). |
onBeforeInitialize | Optional callback invoked just before Flixel.initialize. Pass null to skip. |
launch(FlixelGame, FlixelRuntimeMode, FlixelLwjgl3ApplicationConfiguration)
Launches the LWJGL3 version of the Flixel game using the given configuration. Useful when you have an existing libGDX project with an already-made configuration object.
Parameters:
| Name | Description |
|---|---|
game | The game instance to launch. |
runtimeMode | The FlixelRuntimeMode for this session (TEST, DEBUG, or RELEASE). |
configuration | The FlixelLwjgl3ApplicationConfiguration to use. Use this type (not a raw Lwjgl3ApplicationConfiguration) so a custom Lwjgl3WindowListener can be preserved without reflection. |
launch(FlixelGame, FlixelRuntimeMode, FlixelLwjgl3ApplicationConfiguration, Runnable)
Launches the LWJGL3 version of the Flixel game with full control over both the window configuration and the pre-initialization callback.
onBeforeInitialize fires after all default FlixelGDX backend services (alerter, audio, debug overlay, etc.) have been registered but before Flixel.initialize is called. Use it to override any of those defaults without duplicating the rest of the launcher wiring. Call FlixelLwjgl3Launcher.buildDefaultConfig(FlixelGame, String...) to get the same starting configuration the other overloads would use, then customize it before passing it in:
FlixelLwjgl3ApplicationConfiguration config = FlixelLwjgl3Launcher.buildDefaultConfig(game);
config.setWindowedMode(1920, 1080);
FlixelLwjgl3Launcher.launch(game, FlixelRuntimeMode.DEBUG, config, () -> {
Flixel.setDebugOverlay(MyCustomOverlay::new);
});
Parameters:
| Name | Description |
|---|---|
game | The game instance to launch. |
runtimeMode | The FlixelRuntimeMode for this session (TEST, DEBUG, or RELEASE). |
configuration | The FlixelLwjgl3ApplicationConfiguration to use. |
onBeforeInitialize | Optional callback invoked just before Flixel.initialize. Pass null to skip. |
buildDefaultConfig(FlixelGame, String...)
Builds the default FlixelLwjgl3ApplicationConfiguration for a game the same way the simple launch overloads would. Use this when you need to customize the configuration before passing it to FlixelLwjgl3Launcher.launch(...).
FlixelLwjgl3ApplicationConfiguration config = FlixelLwjgl3Launcher.buildDefaultConfig(game);
config.setWindowedMode(1920, 1080);
FlixelLwjgl3Launcher.launch(game, FlixelRuntimeMode.RELEASE, config);
Parameters:
| Name | Description |
|---|---|
game | The game instance the configuration is built for. |
icons | Window icon paths (may be empty or omitted). Invalid paths are silently skipped. |
Returns: A new FlixelLwjgl3ApplicationConfiguration ready to pass to launch.