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

Function ChatScreen_ColCodeChanged

src/Screens.c:1022–1036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1020}
1021
1022static void ChatScreen_ColCodeChanged(void* screen, int code) {
1023 struct ChatScreen* s = (struct ChatScreen*)screen;
1024 float caretAcc;
1025 if (Gfx.LostContext) return;
1026
1027 SpecialInputWidget_UpdateCols(&s->altText);
1028 TextGroupWidget_RedrawAllWithCol(&s->chat, code);
1029 TextGroupWidget_RedrawAllWithCol(&s->clientStatus, code);
1030
1031 /* Some servers have plugins that redefine colours constantly */
1032 /* Preserve caret accumulator so caret blinking stays consistent */
1033 caretAcc = s->input.base.caretAccumulator;
1034 InputWidget_UpdateText(&s->input.base);
1035 s->input.base.caretAccumulator = caretAcc;
1036}
1037
1038static void ChatScreen_ChatReceived(void* screen, const cc_string* msg, int type) {
1039 struct ChatScreen* s = (struct ChatScreen*)screen;

Callers

nothing calls this directly

Tested by

no test coverage detected