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

Function StoredHotkeys_Add

src/InputHandler.c:242–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void StoredHotkeys_Add(int trigger, cc_uint8 modifiers, cc_bool moreInput, const cc_string* text) {
243 cc_string key; char keyBuffer[STRING_SIZE];
244 cc_string value; char valueBuffer[STRING_SIZE * 2];
245 String_InitArray(key, keyBuffer);
246 String_InitArray(value, valueBuffer);
247
248 String_Format2(&key, "hotkey-%c&%b", Input_StorageNames[trigger], &modifiers);
249 String_Format2(&value, "%t&%s", &moreInput, text);
250 Options_SetString(&key, &value);
251}
252
253
254/*########################################################################################################################*

Callers 1

Calls 2

String_Format2Function · 0.85
Options_SetStringFunction · 0.85

Tested by

no test coverage detected