Mobile: Fix changing touch scale not updating immediately

This commit is contained in:
UnknownShadow200 2020-12-19 15:03:12 +11:00
parent 3f0a2686a9
commit 4c5df56ca6
3 changed files with 4 additions and 4 deletions

View File

@ -119,7 +119,8 @@ static void OnContextRecreated(void* obj) {
}
}
static void OnResize(void* obj) {
static void OnResize(void* obj) { Gui_LayoutAll(); }
void Gui_LayoutAll(void) {
struct Screen* s;
int i;
@ -140,7 +141,6 @@ void Gui_RemoveAll(void) {
while (Gui.ScreensCount) Gui_Remove(Gui_Screens[0]);
}
void Gui_RefreshChat(void) { Gui_Refresh((struct Screen*)Gui_Chat); }
void Gui_Refresh(struct Screen* s) {
s->VTABLE->ContextLost(s);
s->VTABLE->ContextRecreated(s);

View File

@ -213,9 +213,9 @@ struct Screen* Gui_GetBlocksWorld(void);
/* Returns highest priority screen that is closable. */
struct Screen* Gui_GetClosable(void);
void Gui_LayoutAll(void);
void Gui_RefreshAll(void);
void Gui_RemoveAll(void);
void Gui_RefreshChat(void);
void Gui_Refresh(struct Screen* s);
void Gui_RenderGui(double delta);

View File

@ -2762,7 +2762,7 @@ void GraphicsOptionsScreen_Show(void) {
static void ChatOptionsScreen_SetScale(const cc_string* v, float* target, const char* optKey) {
*target = Menu_Float(v);
Options_Set(optKey, v);
Gui_RefreshChat();
Gui_LayoutAll();
}
static void ChatOptionsScreen_GetChatScale(cc_string* v) { String_AppendFloat(v, Gui.RawChatScale, 1); }