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 is an almost 1-to-1 mapping to the Gaia Sky configuration file,
config.yaml
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
Holds configuration options related to the data files.static enum
static enum
static enum
static class
static enum
static class
Graphics settings of Gaia Sky.static enum
static enum
static enum
static enum
static enum
static class
Settings that relate to the performance of the application.static enum
static class
static class
static class
static enum
static class
static class
Settings of the scene, organized into camera, particle groups, star, proper motion, octree, renderer, crosshair, and initialization settings.static enum
static class
static class
static enum
static enum
static enum
static class
This object holds all the data pertaining to the software version. -
Field Summary
FieldsModifier 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
Version of the currently loaded configuration file.static final String
static final String
static final String
static final String
boolean
Initialization flag.static final String
static final String
static final String
static Settings
static final String
static final String
static final int
Source version, used to enable or disable datasets.Fields inherited from class gaiasky.util.SettingsObject
parent
-
Constructor Summary
Constructors -
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
Set 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_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
- See Also:
-
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 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.
-