Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ReadOnlyGameSettings

[20:7] extends: SerializableType

Wraps FXGL's ReadOnlyGameSettings, the runtime view of the settings object returned by FXGL.getSettings() once the game is running. Distinct from the pre-launch GameSettings wrapper used inside onInitSettings: this one exposes the live, post-launch values that game code reads and writes at runtime (global volumes, language, difficulty, fullscreen toggle, dev overlays, scaled width / height). Obtain via fxgl.getSettings() (DSL facade). Not user constructible.

Methods

  • ReadOnlyGameSettings ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing ReadOnlyGameSettings AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a ReadOnlyGameSettings.
    • @r A new wrapper.
  • getGlobalMusicVolume ()

    Returns the global music volume (0.0 - 1.0).

    • @r A double.
  • setGlobalMusicVolume (double Volume)

    Sets the global music volume.

    • @p Volume is the new volume (0.0 - 1.0).
    • @r this object
  • getGlobalSoundVolume ()

    Returns the global sound-effects volume.

    • @r A double.
  • setGlobalSoundVolume (double Volume)

    Sets the global sound-effects volume.

    • @p Volume is the new volume (0.0 - 1.0).
    • @r this object
  • getGameDifficulty ()

    Returns the current game difficulty enum name ("EASY", "MEDIUM", "HARD", "NIGHTMARE").

    • @r A string.
  • setGameDifficulty (string DifficultyName)

    Sets the current game difficulty by enum name.

    • @p DifficultyName is the GameDifficulty name.
    • @r this object
  • gameDifficultyProperty ()

    Returns the difficulty observable property for binding.

    • @r An AussomJavaObject around an ObjectProperty.
  • languageProperty ()

    Returns the language observable property so callers can bind UI labels to the locale.

    • @r An AussomJavaObject around an ObjectProperty.
  • fullScreenProperty ()

    Returns the fullscreen BooleanProperty so callers can flip it at runtime.

    • @r An AussomJavaObject around a BooleanProperty.
  • profileNameProperty ()

    Returns the profile-name StringProperty.

    • @r An AussomJavaObject around a StringProperty.
  • devShowBBoxProperty ()

    Returns the developer-overlay show-bounding-box property.

    • @r An AussomJavaObject around a BooleanProperty.
  • devShowPositionProperty ()

    Returns the developer-overlay show-position property.

    • @r An AussomJavaObject around a BooleanProperty.
  • devEnableDebugCameraProperty ()

    Returns the developer-overlay enable-debug-camera property.

    • @r An AussomJavaObject around a BooleanProperty.
  • devBBoxColorProperty ()

    Returns the dev-overlay bounding-box-color property.

    • @r An AussomJavaObject around an ObjectProperty.
  • devSensorColorProperty ()

    Returns the dev-overlay sensor-color property.

    • @r An AussomJavaObject around an ObjectProperty.
  • actualWidthProperty ()

    Returns the actual (post-scaling) width property for layout code that needs to react to window resize.

    • @r An AussomJavaObject around a ReadOnlyDoubleProperty.
  • actualHeightProperty ()

    Returns the actual (post-scaling) height property.

    • @r An AussomJavaObject around a ReadOnlyDoubleProperty.
  • getTitle ()

  • getVersion ()

  • getAppIcon ()

  • getWidth ()

  • getHeight ()

  • getActualWidth ()

  • getActualHeight ()

  • getFontUI ()

  • getFontMono ()

  • getFontText ()

  • getFontGame ()

  • getSoundNotification ()

  • getSoundMenuBack ()

  • getSoundMenuPress ()

  • getSoundMenuSelect ()

  • getFontSizeScaleUI ()

  • getPixelsPerMeter ()

  • getSecondsIn24h ()

  • getRandomSeed ()

  • getTicksPerSecond ()

  • getMouseSensitivity ()

  • setMouseSensitivity (double V)

  • getUrlPOM ()

  • getUrlGithub ()

  • getUrlLeaderboard ()

  • getVersionCheckDays ()

  • getProfileDir ()

  • getSaveFileExt ()

  • isFullScreenAllowed ()

  • isFullScreenFromStart ()

  • isManualResizeEnabled ()

  • isPreserveResizeRatio ()

  • isScaleAffectedOnResize ()

  • setScaleAffectedOnResize (bool V)

  • isIntroEnabled ()

  • isMainMenuEnabled ()

  • setMainMenuEnabled (bool V)

  • isGameMenuEnabled ()

  • setGameMenuEnabled (bool V)

  • isUserProfileEnabled ()

  • isProfilingEnabled ()

  • isDeveloperMenuEnabled ()

  • isClickFeedbackEnabled ()

  • isEntityPreloadEnabled ()

  • isFileSystemWriteAllowed ()

  • isCloseConfirmation ()

  • isSingleStep ()

  • isPauseMusicWhenMinimized ()

  • isNative ()

  • is3D ()

  • isExperimentalTiledLargeMap ()

  • isDesktop ()

  • isMobile ()

  • isEmbedded ()

  • isBrowser ()

  • isWindows ()

  • isMac ()

  • isLinux ()

  • isIOS ()

  • isAndroid ()

  • getRuntimeInfo ()

  • getApplicationMode ()

  • getMenuKey ()

  • getCredits ()

  • getEnabledMenuItems ()

  • getStageStyle ()

  • getCSSList ()

  • getCollisionDetectionStrategy ()

  • getUserAppClass ()

  • getDefaultCursor ()

  • getEngineServices ()

  • getSceneFactory ()

  • getNotificationViewClass ()

  • getAchievements ()

  • getSupportedLanguages ()

  • getPlatform ()

  • getConfigClass ()

    Returns the Optional<Class<?>> config-class AJO.

  • getLanguage ()

    Returns the current Language enum AJO from the live language property.

  • getFullScreen ()

    Returns the current full-screen flag from the live property.

  • getProfileName ()

    Returns the current profile name from the live property.

  • globalMusicVolumeProperty ()

    Returns the global music volume DoubleProperty, mirroring GameSettings.globalMusicVolumeProperty for binding.

  • globalSoundVolumeProperty ()

    Returns the global sound volume DoubleProperty for binding.

  • prefWidthProperty ()

    Returns the pref-width property AJO (preferred window width).

  • prefHeightProperty ()

    Returns the pref-height property AJO.

  • write (object BundleObj)

    Writes the runtime settings into a Bundle.

  • read (object BundleObj)

    Restores the runtime settings from a Bundle.