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

Function ChatScreen_OpenInput

src/Screens.c:1431–1448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1429}
1430
1431void ChatScreen_OpenInput(const cc_string* text) {
1432 struct ChatScreen* s = &ChatScreen_Instance;
1433 struct OpenKeyboardArgs args;
1434 s->suppressNextPress = true;
1435 s->grabsInput = true;
1436
1437 Gui_UpdateInputGrab();
1438 String_Copy(&s->input.base.text, text);
1439
1440 OpenKeyboardArgs_Init(&args, text, KEYBOARD_TYPE_TEXT | KEYBOARD_FLAG_SEND);
1441 args.placeholder = "Enter chat";
1442 args.multiline = true;
1443 args.yOffset = 30;
1444 OnscreenKeyboard_Open(&args);
1445
1446 Widget_SetDisabled(&s->input.base, args.opaque);
1447 InputWidget_UpdateText(&s->input.base);
1448}
1449
1450void ChatScreen_AppendInput(const cc_string* text) {
1451 struct ChatScreen* s = &ChatScreen_Instance;

Callers 4

TouchMore_ChatFunction · 0.85
TouchScreen_ChatClickFunction · 0.85
HandleHotkeyDownFunction · 0.85
Screens.cFile · 0.85

Calls 6

Gui_UpdateInputGrabFunction · 0.85
String_CopyFunction · 0.85
OpenKeyboardArgs_InitFunction · 0.85
Widget_SetDisabledFunction · 0.85
InputWidget_UpdateTextFunction · 0.85
OnscreenKeyboard_OpenFunction · 0.70

Tested by

no test coverage detected