MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Save

Method Save

src/hotkeys.cpp:286–293  ·  view source on GitHub ↗

* Save HotkeyList to IniFile. * @param ini IniFile to save to. */

Source from the content-addressed store, hash-verified

284 * @param ini IniFile to save to.
285 */
286void HotkeyList::Save(IniFile &ini) const
287{
288 IniGroup &group = ini.GetOrCreateGroup(this->ini_group);
289 for (const Hotkey &hotkey : this->items) {
290 IniItem &item = group.GetOrCreateItem(hotkey.name);
291 item.SetValue(SaveKeycodes(hotkey));
292 }
293}
294
295/**
296 * Check if a keycode is bound to something.

Callers 1

SaveLoadHotkeysFunction · 0.45

Calls 2

SaveKeycodesFunction · 0.85
SetValueMethod · 0.45

Tested by

no test coverage detected