Class Settings
java.lang.Object
gaiasky.util.SettingsObject
gaiasky.util.Settings
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Cloneable
Holds the settings of Gaia Sky. This class is an almost 1-to-1 mapping to the Gaia Sky configuration file,
config.yaml.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classHolds configuration options related to the data files.static enumstatic enumstatic enumstatic classstatic enumstatic classGraphics settings of Gaia Sky.static enumstatic enumstatic enumstatic enumstatic enumstatic classSettings that relate to the performance of the application.static enumstatic classstatic classstatic classstatic enumstatic classstatic classSettings of the scene, organized into camera, particle groups, star, proper motion, octree, renderer, crosshair, and initialization settings.static enumstatic classstatic classstatic enumstatic enumstatic enumstatic classThis object holds all the data pertaining to the software version. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringstatic final Stringstatic final StringAssets location for this instance of Gaia Sky.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringintVersion of the currently loaded configuration file.static final Stringstatic final Stringstatic final Stringstatic final StringbooleanInitialization flag.static final StringURL used to check for internet connection.static final StringLicense file.static final Stringstatic final Stringstatic Settingsstatic final Stringstatic final Stringstatic final intSource version, used to enable or disable datasets.Fields inherited from class SettingsObject
parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply()static StringassetsFileStr(String relativeAssetsLoc) static PathassetsPath(String relativeAssetsLoc) clone()voiddispose()static StringgetApplicationName(boolean vr) static StringgetApplicationTitle(boolean vr) static Stringstatic StringvoidCalled to initialize the settings object.booleanvoidsetConfigVersion(int configVersion) Sets the configuration version.voidsetEnabled(boolean enabled) protected voidstatic booleanSet the static reference toSettingsto the given object.voidMethods inherited from class SettingsObject
setParent
-
Field Details
-
SOURCE_VERSION
public static final int SOURCE_VERSIONSource version, used to enable or disable datasets. This is usually tag where each number is allocated 2 digits. Version = major.minor.rev-seq -> 1.2.5 major=1; minor=2; rev=5; seq=0 Version = major * 1000000 + minor * 10000 + rev * 100 + seq So 1.2.5 -> 1020500 2.1.7 -> 2010700 3.5.3-1 -> 3050301 Leading zeroes are omitted to avoid octal literal interpretation.- See Also:
-
ASSETS_LOC
Assets location for this instance of Gaia Sky. macOS needs fully qualified paths when run as an app (GaiaSky.app), that's why we use theFile.getAbsolutePath()call. -
APPLICATION_SHORT_NAME
- See Also:
-
HOMEPAGE
- See Also:
-
HOMEPAGE_DOWNLOADS
- See Also:
-
DOCUMENTATION
- See Also:
-
REPOSITORY
- See Also:
-
SOCIAL_MEDIA_NAME
- See Also:
-
SOCIAL_MEDIA_URL
- See Also:
-
ICON_URL
-
REPO_ISSUES
- See Also:
-
AUTHOR_NAME
- See Also:
-
AUTHOR_NAME_PLAIN
- See Also:
-
AUTHOR_EMAIL
- See Also:
-
AUTHOR_AFFILIATION
- See Also:
-
AUTHOR_AFFILIATION_PLAIN
- See Also:
-
AUTHOR_WEBSITE_TEXT
- See Also:
-
AUTHOR_WEBSITE_FULL
- See Also:
-
LICENSE_URL
-
INTERNET_CHECK_URL
-
APPLICATION_NAME
-
APPLICATION_NAME_TITLE
-
settings
-
configVersion
public int configVersionVersion of the currently loaded configuration file. -
initialized
public boolean initializedInitialization flag. -
version
-
data
-
performance
-
graphics
-
scene
-
program
-
controls
-
frame
-
screenshot
-
camrecorder
-
postprocess
-
spacecraft
-
proxy
-
runtime
-
-
Constructor Details
-
Settings
public Settings()
-
-
Method Details
-
setSettingsReference
Set the static reference toSettingsto the given object. This method deactivates and disposes the old settings object, and activates the new one.- Parameters:
s- The settings object.- Returns:
- True if the given object is not null, false otherwise.
-
setEnabled
public void setEnabled(boolean enabled) -
isEnabled
public boolean isEnabled()- Overrides:
isEnabledin classSettingsObject
-
initialize
public void initialize()Called to initialize the settings object. This mainly initializes the internal references. -
assetsPath
-
assetsFileStr
-
getApplicationTitle
-
getShortApplicationName
-
getSuperShortApplicationName
-
getApplicationName
-
clone
- Overrides:
clonein classSettingsObject
-
setParentRecursive
- Specified by:
setParentRecursivein classSettingsObject
-
setupListeners
public void setupListeners()- Specified by:
setupListenersin classSettingsObject
-
dispose
public void dispose() -
apply
public void apply() -
setConfigVersion
public void setConfigVersion(int configVersion) Sets the configuration version. Adapts to the new min.maj.rev-seq format automagically.- Parameters:
configVersion- The configuration version.
-