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

Function InputWidget_DeleteKey

src/Widgets.c:1324–1330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1322}
1323
1324static void InputWidget_DeleteKey(struct InputWidget* w) {
1325 if (w->text.length > 0 && w->caretPos != -1) {
1326 String_DeleteAt(&w->text, w->caretPos);
1327 if (w->caretPos >= w->text.length) { w->caretPos = -1; }
1328 InputWidget_UpdateText(w);
1329 }
1330}
1331
1332static void InputWidget_LeftKey(struct InputWidget* w) {
1333 if (Input_IsActionPressed()) {

Callers 1

InputWidget_KeyDownFunction · 0.85

Calls 2

String_DeleteAtFunction · 0.85
InputWidget_UpdateTextFunction · 0.85

Tested by

no test coverage detected