DEADSOFTWARE

gui: close menu before show loadscreen
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 20 Feb 2023 18:07:19 +0000 (21:07 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 9 Jun 2023 09:19:18 +0000 (12:19 +0300)
src/game/g_window.pas

index 92ee3b97161f475f88d1b9acf04528fa566c813d..df97e5149a2682bc6bddbe0499a6e307b315d351 100644 (file)
@@ -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);