make mouse cursor size same, no matter what zoom level is used...
authorsheepluva
Fri, 13 Jun 2014 23:43:34 +0200
changeset 10300 f70b2fb8acab
parent 10299 45e3e901b3b9
child 10301 6a225b469eef
make mouse cursor size same, no matter what zoom level is used...
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Fri Jun 13 21:17:50 2014 +0200
+++ b/hedgewars/uWorld.pas	Fri Jun 13 23:43:34 2014 +0200
@@ -1837,16 +1837,20 @@
             with Ammoz[CurAmmoType] do
                 if PosCount > 1 then
                     begin
+                    if (CurAmmoType = amGirder) or (CurAmmoType = amTeleport) then
+                        begin
                     // pulsating transparency
-                    if ((GameTicks div 16) mod $80) >= $40 then
-                        Tint($FF, $FF, $FF, $C0 - (GameTicks div 16) mod $40)
-                    else
-                        Tint($FF, $FF, $FF, $80 + (GameTicks div 16) mod $40);
+                        if ((GameTicks div 16) mod $80) >= $40 then
+                            Tint($FF, $FF, $FF, $C0 - (GameTicks div 16) mod $40)
+                        else
+                            Tint($FF, $FF, $FF, $80 + (GameTicks div 16) mod $40);
+                        end;
                     DrawSprite(PosSprite, TargetCursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - TargetCursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i);
                     Untint();
                     end;
                 end;
-        DrawSprite(sprArrow, TargetCursorPoint.X, cScreenHeight - TargetCursorPoint.Y, (RealTicks shr 6) mod 8)
+        //DrawSprite(sprArrow, TargetCursorPoint.X, cScreenHeight - TargetCursorPoint.Y, (RealTicks shr 6) mod 8)
+        DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, TargetCursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight - TargetCursorPoint.Y + round(SpritesData[sprArrow].Height / cScaleFactor), (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height);
         end
     end;