Draw mission panel behind ammo menu tooltip
authorWuzzy <Wuzzy2@mail.ru>
Sat, 27 Oct 2018 03:36:25 +0200
changeset 14025 97e48a6c2535
parent 14024 58e54e737279
child 14026 31bdb759d98b
Draw mission panel behind ammo menu tooltip This is noticable in Continental supplies.
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Sat Oct 27 03:31:25 2018 +0200
+++ b/hedgewars/uWorld.pas	Sat Oct 27 03:36:25 2018 +0200
@@ -1601,6 +1601,23 @@
     end;
 {$ENDIF}
 
+// Chat
+DrawChat;
+
+
+// Mission panel
+if not isFirstFrame and (missionTimer <> 0) or isShowMission or isPaused or fastUntilLag or (GameState = gsConfirm) then
+    begin
+    if (ReadyTimeLeft = 0) and (missionTimer > 0) then
+        dec(missionTimer, Lag);
+    if missionTimer < 0 then
+        missionTimer:= 0; // avoid subtracting below 0
+    if missionTex <> nil then
+        DrawTextureCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex);
+    end;
+if missionTimer = 0 then
+    isForceMission := false;
+
 // AmmoMenu
 if bShowAmmoMenu and ((AMState = AMHidden) or (AMState = AMHiding)) then
     begin
@@ -1622,14 +1639,6 @@
 if bShowAmmoMenu or (AMState = AMHiding) then
     ShowAmmoMenu;
 
-// Cursor
-if isCursorVisible and bShowAmmoMenu then
-    DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8);
-
-// Chat
-DrawChat;
-
-
 // Centered status/menu messages (synchronizing, auto skip, pause, etc.)
 if fastUntilLag then
     DrawTextureCentered(0, (cScreenHeight shr 1), SyncTexture)
@@ -1638,18 +1647,9 @@
 else if isPaused then
     DrawTextureCentered(0, (cScreenHeight shr 1), PauseTexture);
 
-// Mission panel
-if not isFirstFrame and (missionTimer <> 0) or isShowMission or isPaused or fastUntilLag or (GameState = gsConfirm) then
-    begin
-    if (ReadyTimeLeft = 0) and (missionTimer > 0) then
-        dec(missionTimer, Lag);
-    if missionTimer < 0 then
-        missionTimer:= 0; // avoid subtracting below 0
-    if missionTex <> nil then
-        DrawTextureCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex);
-    end;
-if missionTimer = 0 then
-    isForceMission := false;
+// Cursor
+if isCursorVisible and bShowAmmoMenu then
+    DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8);
 
 // FPS and demo replay time
 {$IFDEF USE_TOUCH_INTERFACE}