Package gaiasky.util
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 has a near 1-to-1 mapping to the configuration file, conf.yaml.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static enum
static enum
static enum
static class
static enum
static class
static enum
static enum
static enum
static enum
static enum
static class
static enum
static class
static class
static class
static enum
static class
static class
static enum
static class
static class
static enum
static enum
static enum
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
static String
static final String
static final String
Assets location for this instance of Gaia Sky.static final String
static final String
static final String
static final String
static final String
static final String
static final String
int
static final String
static final String
static final String
static final String
boolean
static final String
static final String
static final String
static Settings
static final String
static final String
static final int
Fields inherited from class gaiasky.util.SettingsObject
parent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
static String
assetsFileStr
(String relativeAssetsLoc) static Path
assetsPath
(String relativeAssetsLoc) clone()
void
dispose()
static String
getApplicationName
(boolean vr) static String
getApplicationTitle
(boolean vr) static String
static String
void
Called to initialize the settings object.boolean
void
setConfigVersion
(int configVersion) Sets the configuration version.void
setEnabled
(boolean enabled) protected void
static boolean
Sets the static reference toSettings
to the given object.protected void
Methods inherited from class gaiasky.util.SettingsObject
setParent
-
Field Details
-
SOURCE_VERSION
public static final int SOURCE_VERSION- 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
- See Also:
-
APPLICATION_NAME
-
APPLICATION_NAME_TITLE
-
settings
-
configVersion
public int configVersion -
initialized
public boolean initialized -
version
-
data
-
performance
-
graphics
-
scene
-
program
-
controls
-
frame
-
screenshot
-
camrecorder
-
postprocess
-
spacecraft
-
proxy
-
runtime
-
-
Constructor Details
-
Settings
public Settings()
-
-
Method Details
-
setSettingsReference
Sets the static reference toSettings
to 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:
isEnabled
in 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:
clone
in classSettingsObject
-
setParentRecursive
- Specified by:
setParentRecursive
in classSettingsObject
-
setupListeners
protected void setupListeners()- Specified by:
setupListeners
in 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.
-