| 139 | |
| 140 | |
| 141 | void Hotkeys_Add(int trigger, cc_uint8 modifiers, const cc_string* text, cc_uint8 flags) { |
| 142 | struct HotkeyData* hk = HotkeysList; |
| 143 | int i; |
| 144 | |
| 145 | for (i = 0; i < HotkeysText.count; i++, hk++) { |
| 146 | if (hk->trigger != trigger || hk->mods != modifiers) continue; |
| 147 | Hotkeys_RemoveText(hk->textIndex); |
| 148 | |
| 149 | hk->flags = flags; |
| 150 | hk->textIndex = HotkeysText.count; |
| 151 | StringsBuffer_Add(&HotkeysText, text); |
| 152 | return; |
| 153 | } |
| 154 | Hotkeys_AddNewHotkey(trigger, modifiers, text, flags); |
| 155 | } |
| 156 | |
| 157 | cc_bool Hotkeys_Remove(int trigger, cc_uint8 modifiers) { |
| 158 | struct HotkeyData* hk = HotkeysList; |
no test coverage detected