[22:14] (extern: com.lehman.aussom.stdlib.fxgl.AussomGameSettings) extends: object
Wraps FXGL's GameSettings, the configuration object passed to fxglApp.onInitSettings. Provides fluent setters for the common properties games tune at startup. Backed directly by the underlying FXGL GameSettings instance, so changes apply immediately. Typical use: app = fxgl.gameApp("My Game", 800, 600); app.onInitSettings(::settings); ... public settings(s) { s.setVersion("1.0"); s.setFullScreenAllowed(true); s.setMainMenuEnabled(true); }
setTitle (string Title)
Sets the window title.
Title is the new title string.this objectsetVersion (string Version)
Sets the game version string (typically shown in menus).
Version is the version string.this objectsetWidth (int Width)
Sets the game viewport width in pixels.
Width is the new width.this objectsetHeight (int Height)
Sets the game viewport height in pixels.
Height is the new height.this objectsetAppIcon (string Path)
Sets the asset path of the application icon image.
Path is the icon resource path.this objectsetFullScreenAllowed (bool Allowed)
Allows the game to enter full-screen mode (does not enter it).
Allowed is a bool.this objectsetFullScreenFromStart (bool FromStart)
Starts the game in full-screen mode (requires setFullScreenAllowed true).
FromStart is a bool.this objectsetMainMenuEnabled (bool Enabled)
Enables the FXGL main-menu scene at startup.
Enabled is a bool.this objectsetGameMenuEnabled (bool Enabled)
Enables the in-game menu accessible while playing.
Enabled is a bool.this objectsetIntroEnabled (bool Enabled)
Enables FXGL's intro animation shown before the main menu.
Enabled is a bool.this objectsetManualResizeEnabled (bool Enabled)
Allows the user to resize the game window by dragging its borders.
Enabled is a bool.this objectsetPreserveResizeRatio (bool Enabled)
Preserves the game viewport aspect ratio during manual resize.
Enabled is a bool.this objectsetProfilingEnabled (bool Enabled)
Enables FXGL's frame-rate / memory profiler overlay during the game.
Enabled is a bool.this objectsetIs3D (bool Enabled)
Switches FXGL into 3D mode, which enables the SceneFactory's 3D camera and the scene3d primitives (Cuboid, Prism, Torus, Model3D, SkyboxBuilder). FXGL default is false.
Enabled is a bool.this objectsetFileSystemWriteAllowed (bool Allowed)
Master switch for FXGL writing to the local filesystem. When disabled (false), FXGL skips writing the per-run log file under logs/ and the user-profile bundle under system/. Set this in onInitSettings before launch to prevent FXGL from creating any files in the current working directory.
Allowed is a bool. FXGL default is true.this objectsetUserProfileEnabled (bool Enabled)
Controls whether FXGL persists a user-profile bundle (the system/fxgl.bundle file plus its Readme.txt). When disabled (false) FXGL keeps profile state in memory only. Has no effect if setFileSystemWriteAllowed is also false; the master switch takes priority.
Enabled is a bool. FXGL default is false.this objectgetTitle ()
Returns the current title.
A string with the title.getVersion ()
Returns the current version string.
A string with the version.getWidth ()
Returns the current width.
An int with the width.getHeight ()
Returns the current height.
An int with the height.addAchievement (object AchievementObj)
Registers an Achievement with the engine. Must be called from the onInitSettings callback (before the engine starts) -- achievements added after launch are ignored. The AchievementService binds them to their named world properties once the game scene initializes.
AchievementObj is an Achievement wrapper.setApplicationMode (string ModeName)
Sets the application mode ("DEVELOPER", "DEBUG", "RELEASE"). RELEASE turns off the dev console and verbose logging.
setScaleAffectedOnResize (bool Enabled)
Enables UI scaling on window resize. Default true.
setDeveloperMenuEnabled (bool Enabled)
Enables the FXGL developer menu (debug overlay).
setClickFeedbackEnabled (bool Enabled)
Enables the visual click feedback.
setCloseConfirmation (bool Enabled)
Shows a confirmation dialog when the user closes the window.
setPauseMusicWhenMinimized (bool Enabled)
Pauses background music when the window minimizes. FXGL default is true.
setSingleStep (bool Enabled)
Enables frame-by-frame stepping (advanced debug only).
setEntityPreloadEnabled (bool Enabled)
Pre-loads every registered entity factory at startup.
setPixelsPerMeter (double Value)
Sets the pixels-per-meter ratio for the physics world.
setCollisionDetectionStrategy (string StrategyName)
Sets the broadphase collision-detection strategy ("BRUTE_FORCE" or "GRID_INDEX").
setSecondsIn24h (int Seconds)
Sets the in-game seconds-per-day duration.
setRandomSeed (int Seed)
Sets the random seed (-1 for non-deterministic).
setTicksPerSecond (int Ticks)
Sets the engine tick rate per second (-1 for FXGL default).
setMouseSensitivity (double Sensitivity)
Sets the 3D camera mouse sensitivity.
setCssList (list Paths)
Replaces the active stylesheet list. Each entry is a resource path.
setFontUI (string Path)
Sets the UI font resource path.
setFontMono (string Path)
Sets the mono font resource path.
setFontText (string Path)
Sets the text font resource path.
setFontGame (string Path)
Sets the game font resource path.
setSoundNotification (string Path)
Sets the notification sound resource path.
setSoundMenuBack (string Path)
Sets the menu-back sound resource path.
setSoundMenuPress (string Path)
Sets the menu-press sound resource path.
setSoundMenuSelect (string Path)
Sets the menu-select sound resource path.
setFontSizeScaleUI (double Scale)
Sets the UI font-size scale multiplier.
setMenuKey (string KeyName)
Sets the keyboard key that opens the in-game menu.
KeyName is the KeyCode enum name.setEnabledMenuItems (list Names)
Selects which menu items appear. Pass a list of MenuItem enum names: "SAVE_LOAD", "EXTRA", "ONLINE".
setStageStyle (string StyleName)
Sets the window stage style ("DECORATED", "UNDECORATED", "TRANSPARENT", "UTILITY", "UNIFIED").
setCredits (list Credits)
Replaces the credits list shown on the credits screen.
setDefaultLanguage (object LanguageObj)
Sets the default language used at startup before the user can pick one. Pass a Language wrapper.
setSupportedLanguages (list Languages)
Sets the supported-languages list. Pass a list of Language wrappers.
addEngineService (string ClassName)
Adds an EngineService to the runtime. Pass the fully qualified class name (e.g. "com.example.MyService").
removeEngineService (string ClassName)
Removes an EngineService by fully qualified class name.
addEngineServiceClass (object JavaClass)
Adds an EngineService whose Java Class object is supplied directly (typically obtained via
aji.invokeStaticRaw("java.lang.Class", "forName", name)). Use this when the string form cannot resolve the class (custom class loader, relocated package, etc.).
JavaClass is an AussomJavaObject around a java.lang.Class<? extends EngineService>.removeEngineServiceClass (object JavaClass)
Removes an EngineService by Java Class object. Mirrors addEngineServiceClass.
JavaClass is an AussomJavaObject around a java.lang.Class<? extends EngineService>.addAussomEngineService (string AussomClassName)
Registers an Aussom class as an EngineService. The named class is instantiated once (no-arg ctor) and any of its methods that match an EngineService hook (onInit, onMainLoopStarting, onVarsInitialized, onGameReady, onUpdate, onGameUpdate, onGameReset, onExit, onMainLoopPausing, onMainLoopResumed, write, read) get dispatched by the AussomEngineService bridge during the engine's lifecycle. Use fxgl.getAussomService(ClassName) to retrieve the running instance after the engine starts.
AussomClassName is a string with the name of an Aussom class loaded into the current engine.this objectsetHeightFromRatio (double Ratio)
Computes height from the given (height/width) ratio.
setWidthFromRatio (double Ratio)
Computes width from the given (width/height) ratio.
setSceneFactory (object FactoryObj)
Replaces the default SceneFactory. Pass a wrapper around a SceneFactory subclass.
setNotificationViewClass (string ClassName)
Replaces the NotificationView class used to render notifications. Pass the fully qualified class name.
setIsExperimentalTiledLargeMap (bool Enabled)
Enables the experimental tiled large-map support. Use only if your level layer reports performance issues.
getAchievements ()
Returns the registered Achievements as a list of AussomJavaObjects.
getCssList ()
Returns the underlying CSS-stylesheet List as an AussomJavaObject so callers can append to FXGL's defaults via
.invoke("add", "main.css")rather than rebuilding the full list.
getAppIcon ()
getFontUI ()
getFontMono ()
getFontText ()
getFontGame ()
getSoundMenuBack ()
getSoundMenuPress ()
getSoundMenuSelect ()
getSoundNotification ()
getPixelsPerMeter ()
getMouseSensitivity ()
getFontSizeScaleUI ()
getTicksPerSecond ()
getSecondsIn24h ()
getRandomSeed ()
is3D ()
isFullScreenAllowed ()
isFullScreenFromStart ()
isMainMenuEnabled ()
isGameMenuEnabled ()
isIntroEnabled ()
isManualResizeEnabled ()
isPreserveResizeRatio ()
isProfilingEnabled ()
isFileSystemWriteAllowed ()
isUserProfileEnabled ()
isScaleAffectedOnResize ()
isDeveloperMenuEnabled ()
isClickFeedbackEnabled ()
isCloseConfirmation ()
isPauseMusicWhenMinimized ()
isSingleStep ()
isEntityPreloadEnabled ()
isExperimentalTiledLargeMap ()
isNative ()
setNative (bool Value)
setExperimentalTiledLargeMap (bool Value)
getApplicationMode ()
Returns the ApplicationMode enum name (e.g. "RELEASE").
getCollisionDetectionStrategy ()
Returns the CollisionDetectionStrategy enum name.
getStageStyle ()
Returns the StageStyle enum name.
getMenuKey ()
Returns the menu KeyCode enum name (e.g. "ESCAPE").
getDefaultCursor ()
Returns the default CursorInfo wrapped as an AJO.
getDefaultLanguage ()
Returns the default Language wrapped as an AJO.
getSupportedLanguages ()
Returns the supported-Languages List as an AJO.
getEnabledMenuItems ()
Returns the enabled MenuItems EnumSet as an AJO.
getEngineServices ()
Returns the EngineService Class list as an AJO.
getConfigClass ()
Returns the configured config Class as an AJO.
getNotificationViewClass ()
Returns the NotificationView Class as an AJO.
getRuntimeInfo ()
Returns the RuntimeInfo as an AJO.
getSceneFactory ()
Returns the SceneFactory as an AJO.
getCredits ()
Returns the credits list as an Aussom list of strings.
setDefaultCursor (object CursorObj)
Sets the default CursorInfo.
CursorObj is a CursorInfo wrapper or AJO.setRuntimeInfo (object RuntimeInfoObj)
Sets the RuntimeInfo.
RuntimeInfoObj is a RuntimeInfo wrapper or AJO.setEngineServiceProvider (object ServiceClass, object ProviderClass)
Registers a replacement EngineService class for a given service interface. Both args are Class AJOs (typically built via aji.invokeStaticRaw("java.lang.Class", "forName", name)).
ServiceClass is the service interface Class AJO.ProviderClass is the implementing Class AJO.setEngineServices (list ServiceClasses)
Sets the EngineService class list.
ServiceClasses is a list of Class AJOs.setConfigClass (object ConfigClassObj)
Sets the config class.
ConfigClassObj is a Class AJO.setAchievementsList (list Achievements)
Replaces the achievement list with a list of Achievement wrappers. Distinct from addAchievement, which appends one.
Achievements is a list of Achievement wrappers.toReadOnly (object AppClassObj)
Returns a ReadOnlyGameSettings AJO snapshot of this configuration. FXGL uses the app Class to resolve runtime info (entry point, package, etc.).
AppClassObj is a Class AJO of the GameApplication subclass.