Public Member Functions | Data Fields

# SettingDesc Struct Reference

## Public Member Functions
bool | IsEditable (bool do_command=false) const
| Check whether the setting is editable in the current gamemode.
SettingType | GetType () const
| Return the type of the setting.
## Data Fields
SettingDescBase | desc
| Settings structure (going to configuration file).
SaveLoad | save
| Internal structure (going to savegame, parts to config).

## Detailed Description

Definition at line 111 of file settings_internal.h.

## Member Function Documentation

SettingType SettingDesc::GetType | ( |  | ) | const

Return the type of the setting.

Returns:
  type of setting

Definition at line 755 of file settings.cpp.

References SaveLoad::conv, desc, SettingDescBase::flags, save, SGF_PER_COMPANY, SLF_NOT_IN_SAVE, and ST_CLIENT.

Referenced by GameSettingsWindow::DrawWidget(), and SettingEntry::UpdateFilterState().

bool SettingDesc::IsEditable | ( | bool | do_command = `false` | ) | const

Check whether the setting is editable in the current gamemode.

Parameters:

  | do_command | true if this is about checking a command from the server.

Returns:
  true if editable.

Definition at line 740 of file settings.cpp.

References _network_server, _networking, SaveLoad::conv, desc, SettingDescBase::flags, save, SGF_NETWORK_ONLY, SGF_NEWGAME_ONLY, SGF_NO_NETWORK, SGF_PER_COMPANY, SGF_SCENEDIT_TOO, and SLF_NO_NETWORK_SYNC.

Referenced by CmdChangeSetting(), SettingEntry::DrawSetting(), and GameSettingsWindow::OnClick().

The documentation for this struct was generated from the following files:

- src/settings_internal.h
- src/settings.cpp