Better handle pointing with mouse cursor on zoom
authorunc0rr
Thu, 30 Jul 2009 09:32:56 +0000
changeset 2287 e34b5363ae91
parent 2286 8a24e0858947
child 2288 c01b8258918d
Better handle pointing with mouse cursor on zoom
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Wed Jul 29 23:01:19 2009 +0000
+++ b/hedgewars/uWorld.pas	Thu Jul 30 09:32:56 2009 +0000
@@ -402,24 +402,11 @@
 // AmmoMenu
 if (AMxShift < 210) or bShowAmmoMenu then ShowAmmoMenu;
 
-DrawChat;
+// Cursor
+if isCursorVisible and bShowAmmoMenu then
+   DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8);
 
-// Cursor
-if isCursorVisible then
-   begin
-   if not bShowAmmoMenu then
-     with CurrentHedgehog^ do
-       if (Gear^.State and gstHHChooseTarget) <> 0 then
-         begin
-         i:= Ammo^[CurSlot, CurAmmo].Pos;
-         with Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType] do
-           if PosCount > 1 then
-              DrawSprite(PosSprite, CursorPoint.X - SpritesData[PosSprite].Width div 2,
-                                    cScreenHeight - CursorPoint.Y - SpritesData[PosSprite].Height div 2,
-                                    i);
-         end;
-   DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8)
-   end;
+DrawChat;
 
 if isPaused then DrawCentered(cScreenWidth div 2, cScreenHeight div 2, PauseTexture);
 
@@ -457,6 +444,24 @@
 
 SetScale(zoom);
 
+// Cursor
+if isCursorVisible then
+   begin
+   if not bShowAmmoMenu then
+     with CurrentHedgehog^ do
+       if (Gear^.State and gstHHChooseTarget) <> 0 then
+         begin
+         i:= Ammo^[CurSlot, CurAmmo].Pos;
+         with Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType] do
+           if PosCount > 1 then
+              DrawSprite(PosSprite, CursorPoint.X - SpritesData[PosSprite].Width div 2,
+                                    cScreenHeight - CursorPoint.Y - SpritesData[PosSprite].Height div 2,
+                                    i);
+         end;
+   DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8)
+   end;
+
+
 glDisable(GL_TEXTURE_2D);
 glDisable(GL_BLEND)
 end;