diff options
author | frosch <frosch@openttd.org> | 2012-11-08 10:04:00 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-08 10:04:00 +0000 |
commit | 69a62452beab943a4f95d0aead7207d3f9de0a44 (patch) | |
tree | 4977654ebce513c7e02f77bce2a2f60dc5429692 /src/settings_internal.h | |
parent | 79a1e6450b2fdf38c2e044d306bac2fa630db814 (diff) | |
download | openttd-69a62452beab943a4f95d0aead7207d3f9de0a44.tar.xz |
(svn r24671) -Feature [FS#5355]: Add basic/advanced/expert filters to adv. settings GUI. (Eagle_rainbow)
Diffstat (limited to 'src/settings_internal.h')
-rw-r--r-- | src/settings_internal.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h index dccbece4e..baaef165e 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -52,6 +52,30 @@ enum SettingGuiFlagLong { DECLARE_ENUM_AS_BIT_SET(SettingGuiFlagLong) typedef SimpleTinyEnumT<SettingGuiFlagLong, uint16> SettingGuiFlag; +/** + * A SettingCategory defines a grouping of the settings. + * The group #SC_BASIC is intended for settings which also a novice player would like to change and is able to understand. + * The group #SC_ADVANCED is intended for settings which an experienced player would like to use. This is the case for most settings. + * Finally #SC_EXPERT settings only few people want to see in rare cases. + * The grouping is meant to be inclusive, i.e. all settings in #SC_BASIC also will be included + * in the set of settings in #SC_ADVANCED. The group #SC_EXPERT contains all settings. + */ +enum SettingCategory { + SC_NONE = 0, + + /* Filters for the list */ + SC_BASIC_LIST = 1 << 0, ///< Settings displayed in the list of basic settings. + SC_ADVANCED_LIST = 1 << 1, ///< Settings displayed in the list of advanced settings. + SC_EXPERT_LIST = 1 << 2, ///< Settings displayed in the list of expert settings. + + /* Setting classification */ + SC_BASIC = SC_BASIC_LIST | SC_ADVANCED_LIST | SC_EXPERT_LIST, ///< Basic settings are part of all lists. + SC_ADVANCED = SC_ADVANCED_LIST | SC_EXPERT_LIST, ///< Advanced settings are part of advanced and expert list. + SC_EXPERT = SC_EXPERT_LIST, ///< Expert settings can only be seen in the expert list. + + SC_END, +}; + typedef bool OnChange(int32 var); ///< callback prototype on data modification typedef size_t OnConvert(const char *value); ///< callback prototype for convertion error @@ -71,6 +95,7 @@ struct SettingDescBase { StringID str_val; ///< (Translated) first string describing the value. OnChange *proc; ///< callback procedure for when the value is changed OnConvert *proc_cnvt; ///< callback procedure when loading value mechanism fails + SettingCategory cat; ///< assigned categories of the setting }; struct SettingDesc { |