(svn r24860) -Codechange: Add SettingDesc::GetType().

This commit is contained in:
frosch
2012-12-26 17:43:35 +00:00
parent 9bce12a0ce
commit 0efd29b71b
3 changed files with 24 additions and 6 deletions

View File

@@ -748,6 +748,16 @@ bool SettingDesc::IsEditable(bool do_command) const
return true;
}
/**
* Return the type of the setting.
* @return type of setting
*/
SettingType SettingDesc::GetType() const
{
if (this->desc.flags & SGF_PER_COMPANY) return ST_COMPANY;
return (this->save.conv & SLF_NOT_IN_SAVE) ? ST_CLIENT : ST_GAME;
}
/* Begin - Callback Functions for the various settings. */
/** Reposition the main toolbar as the setting changed. */