diff options
author | frosch <frosch@openttd.org> | 2013-05-26 19:27:22 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-26 19:27:22 +0000 |
commit | 23ba42b66ccf915230cab163cdeca19db6e95f76 (patch) | |
tree | eea2f6daffe6fc9283487ed3736dde80ebc87825 /src/settings.cpp | |
parent | 8157a8afd814cb24aaaa4c725817c864e0c583c6 (diff) | |
download | openttd-23ba42b66ccf915230cab163cdeca19db6e95f76.tar.xz |
(svn r25291) -Add: WindowDesc ability to load and store information in a config file.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 293ce406d..4a2b66e6b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -733,6 +733,28 @@ static void IniSaveSettingList(IniFile *ini, const char *grpname, StringList *li } /** + * Load a WindowDesc from config. + * @param ini IniFile handle to the ini file with the source data + * @param grpname character string identifying the section-header of the ini file that will be parsed + * @param desc Destination WindowDesc + */ +void IniLoadWindowSettings(IniFile *ini, const char *grpname, void *desc) +{ + IniLoadSettings(ini, _window_settings, grpname, desc); +} + +/** + * Save a WindowDesc to config. + * @param ini IniFile handle to the ini file where the destination data is saved + * @param grpname character string identifying the section-header of the ini file + * @param desc Source WindowDesc + */ +void IniSaveWindowSettings(IniFile *ini, const char *grpname, void *desc) +{ + IniSaveSettings(ini, _window_settings, grpname, desc); +} + +/** * Check whether the setting is editable in the current gamemode. * @param do_command true if this is about checking a command from the server. * @return true if editable. |