MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Hotkeys_Remove

Function Hotkeys_Remove

src/InputHandler.c:157–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157cc_bool Hotkeys_Remove(int trigger, cc_uint8 modifiers) {
158 struct HotkeyData* hk = HotkeysList;
159 int i, j;
160
161 for (i = 0; i < HotkeysText.count; i++, hk++) {
162 if (hk->trigger != trigger || hk->mods != modifiers) continue;
163 Hotkeys_RemoveText(hk->textIndex);
164
165 for (j = i; j < HotkeysText.count; j++) {
166 HotkeysList[j] = HotkeysList[j + 1];
167 }
168 return true;
169 }
170 return false;
171}
172
173int Hotkeys_FindPartial(int key) {
174 struct HotkeyData hk;

Callers 3

CPE_SetTextHotkeyFunction · 0.85

Calls 1

Hotkeys_RemoveTextFunction · 0.85

Tested by

no test coverage detected