From: DeaDDooMER Date: Mon, 20 Feb 2023 18:07:19 +0000 (+0300) Subject: gui: close menu before show loadscreen X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=d52e9d7b6bcc5c1846c82c3908a4688339e736f3;p=d2df-sdl.git gui: close menu before show loadscreen --- diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 92ee3b9..df97e51 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -32,11 +32,17 @@ implementation {$IFDEF ENABLE_SYSTEM} g_system, {$ENDIF} + {$IFDEF ENABLE_MENU} + g_gui, + {$ENDIF} e_sound, g_net ; procedure ProcessLoading (forceUpdate: Boolean = False); begin + {$IFDEF ENABLE_MENU} + g_ActiveWindow := nil; + {$ENDIF} {$IFDEF ENABLE_RENDER} r_Render_DrawLoading(forceUpdate); {$ENDIF} @@ -44,6 +50,9 @@ implementation procedure g_Game_ClearLoading; begin + {$IFDEF ENABLE_MENU} + g_ActiveWindow := nil; + {$ENDIF} {$IFDEF ENABLE_RENDER} r_Render_ClearLoading; {$ENDIF} @@ -51,6 +60,9 @@ implementation procedure g_Game_SetLoadingText (const text: String; maxval: Integer; rewrite: Boolean); begin + {$IFDEF ENABLE_MENU} + g_ActiveWindow := nil; + {$ENDIF} {$IFDEF ENABLE_RENDER} if maxval < 0 then maxval := 0; r_Render_SetLoading(text, maxval); @@ -59,6 +71,9 @@ implementation procedure g_Game_StepLoading (value: Integer = -1); begin + {$IFDEF ENABLE_MENU} + g_ActiveWindow := nil; + {$ENDIF} {$IFDEF ENABLE_RENDER} if value < 0 then value := 1; r_Render_StepLoading(value);