* Load HotkeyList from IniFile. * @param ini IniFile to load from. */
| 267 | * @param ini IniFile to load from. |
| 268 | */ |
| 269 | void HotkeyList::Load(const IniFile &ini) |
| 270 | { |
| 271 | const IniGroup *group = ini.GetGroup(this->ini_group); |
| 272 | if (group == nullptr) return; |
| 273 | for (Hotkey &hotkey : this->items) { |
| 274 | const IniItem *item = group->GetItem(hotkey.name); |
| 275 | if (item != nullptr) { |
| 276 | hotkey.keycodes.clear(); |
| 277 | if (item->value.has_value()) ParseHotkeys(hotkey, *item->value); |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | /** |
| 283 | * Save HotkeyList to IniFile. |
no test coverage detected