Go to the documentation of this file.
10 #ifndef SETTINGS_INTERNAL_H
11 #define SETTINGS_INTERNAL_H
114 bool IsEditable(
bool do_command =
false)
const;
128 bool SetSettingValue(uint index, int32 value,
bool force_newgame =
false);
129 bool SetSettingValue(uint index,
const char *value,
bool force_newgame =
false);
@ SDT_STRING
string with a pre-allocated buffer
@ SC_EXPERT_LIST
Settings displayed in the list of expert settings.
SettingCategory cat
assigned categories of the setting
StringID str_val
(Translated) first string describing the value.
@ SGF_PER_COMPANY
this setting can be different for each company (saved in company struct)
SaveLoad save
Internal structure (going to savegame, parts to config)
SettingType GetType() const
Return the type of the setting.
bool IsEditable(bool do_command=false) const
Check whether the setting is editable in the current gamemode.
@ SDT_BOOLX
a boolean number
@ ST_CLIENT
Client setting.
@ SGF_NEWGAME_ONLY
this setting cannot be changed in a game
bool OnChange(int32 var)
callback prototype on data modification
@ ST_COMPANY
Company setting.
@ SGF_DISPLAY_ABS
display absolute value of the setting
const char * many
ONE/MANY_OF_MANY: string of possible values for this type.
@ SDT_NUMX
any number-type
StringID str
(translated) string with descriptive text; gui and console
bool startup
setting has to be loaded directly at startup?
@ SDT_STDSTRING
std::string
SettingType
Type of settings for filtering.
SettingDescType cmd
various flags for the variable
Properties of config file settings.
SettingDescType
Convention/Type of settings.
@ SGF_NETWORK_ONLY
this setting only applies to network games
@ SC_ADVANCED
Advanced settings are part of advanced and expert list.
@ SDT_MANYOFMANY
bitmasked number where MULTIPLE bits may be set
@ SDT_ONEOFMANY
bitmasked number where only ONE bit may be set
const void * def
default value given when none is present
int32 interval
the interval to use between settings in the 'settings' window. If interval is '0' the interval is dyn...
@ SDT_INTLIST
list of integers separated by a comma ','
void SetCompanySetting(uint index, int32 value)
Top function to save the new value of an element of the Settings struct.
SettingGuiFlag flags
handles how a setting would show up in the GUI (text/currency, etc.)
const SettingDesc * GetSettingFromName(const char *name, uint *i)
Given a name of setting, return a setting description of it.
@ SC_BASIC
Basic settings are part of all lists.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
@ SGF_MULTISTRING
the value represents a limited number of string-options (internally integer)
@ SGF_0ISDISABLED
a value of zero means the feature is disabled
@ SGF_NO_NETWORK
this setting does not apply to network games; it may not be changed during the game
@ SC_BASIC_LIST
Settings displayed in the list of basic settings.
@ SGF_CURRENCY
the number represents money, so when reading value multiply by exchange rate
bool SetSettingValue(uint index, int32 value, bool force_newgame=false)
Top function to save the new value of an element of the Settings struct.
SettingDescBase desc
Settings structure (going to configuration file)
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
size_t OnConvert(const char *value)
callback prototype for conversion error
SettingCategory
A SettingCategory defines a grouping of the settings.
const char * name
name of the setting. Used in configuration file and for console
OnChange * proc
callback procedure for when the value is changed
@ ST_ALL
Used in setting filter to match all types.
@ SC_ADVANCED_LIST
Settings displayed in the list of advanced settings.
OnConvert * proc_cnvt
callback procedure when loading value mechanism fails
@ SC_EXPERT
Expert settings can only be seen in the expert list.
@ SGF_SCENEDIT_TOO
this setting can be changed in the scenario editor (only makes sense when SGF_NEWGAME_ONLY is set)
StringID str_help
(Translated) string with help text; gui only.
@ SGF_SCENEDIT_ONLY
this setting can only be changed in the scenario editor