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

Function KeyBindsScreen_ContextRecreated

src/Menus.c:2048–2066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2046}
2047
2048static void KeyBindsScreen_ContextRecreated(void* screen) {
2049 struct KeyBindsScreen* s = (struct KeyBindsScreen*)screen;
2050 struct FontDesc textFont;
2051 int i;
2052
2053 Screen_UpdateVb(screen);
2054 Gui_MakeTitleFont(&s->titleFont);
2055 Gui_MakeBodyFont(&textFont);
2056 for (i = 0; i < s->bindsCount; i++) { KeyBindsScreen_Update(s, i); }
2057
2058 TextWidget_SetConst(&s->title, s->titleText, &s->titleFont);
2059 TextWidget_SetConst(&s->msg, s->msgText, &textFont);
2060 ButtonWidget_SetConst(&s->back, "Done", &s->titleFont);
2061
2062 Font_Free(&textFont);
2063 if (!s->leftPage && !s->rightPage) return;
2064 ButtonWidget_SetConst(&s->left, "<", &s->titleFont);
2065 ButtonWidget_SetConst(&s->right, ">", &s->titleFont);
2066}
2067
2068static void KeyBindsScreen_Layout(void* screen) {
2069 struct KeyBindsScreen* s = (struct KeyBindsScreen*)screen;

Callers

nothing calls this directly

Calls 7

Screen_UpdateVbFunction · 0.85
Gui_MakeTitleFontFunction · 0.85
Gui_MakeBodyFontFunction · 0.85
KeyBindsScreen_UpdateFunction · 0.85
TextWidget_SetConstFunction · 0.85
ButtonWidget_SetConstFunction · 0.85
Font_FreeFunction · 0.85

Tested by

no test coverage detected