fix ammomenu, the cursor actually works now -_-
authorXeli
Sun, 18 Mar 2012 18:19:20 +0100
changeset 6802 8701007d58c0
parent 6801 b42bdf470b84
child 6803 0e70f3ea3bf8
fix ammomenu, the cursor actually works now -_-
hedgewars/uWorld.pas
project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons/backjump.png
--- a/hedgewars/uWorld.pas	Sun Mar 18 14:22:13 2012 +0100
+++ b/hedgewars/uWorld.pas	Sun Mar 18 18:19:20 2012 +0100
@@ -502,20 +502,25 @@
 {$ENDIF}
     AMShiftTargetX:= (cScreenWidth shr 1) - AmmoRect.x;
     AMShiftTargetY:= cScreenHeight        - AmmoRect.y;
-(*
+
     if (AMAnimType and AMTypeMaskX) <> 0 then AMShiftTargetX:= (cScreenWidth shr 1) - AmmoRect.x
     else AMShiftTargetX:= 0;
     if (AMAnimType and AMTypeMaskY) <> 0 then AMShiftTargetY:= cScreenHeight        - AmmoRect.y
     else AMShiftTargetY:= 0;
-*)
+
     AMShiftX:= AMShiftTargetX;
     AMShiftY:= AMShiftTargetY;
 end;
 
 AMAnimState:= (RealTicks - AMAnimStartTime) / AMAnimDuration;
+
+if AMState = AMShowing then
+    begin
+    FollowGear:=nil;
+    end;
+
 if AMState = AMShowingUp then // show ammo menu
     begin
-    FollowGear:= nil;
     if (cReducedQuality and rqSlowMenu) <> 0 then
         begin
         AMShiftX:= 0;
@@ -1555,7 +1560,7 @@
 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then
     exit;
 
-if (AMShiftX <> AMShiftTargetX) and (AMShiftY <> AMShiftTargetY) then
+if (AMState = AMShowingUp) or (AMState = AMShowing) then
 begin
     if CursorPoint.X < AmmoRect.x then//check left 
         CursorPoint.X:= AmmoRect.x;
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons/backjump.png has changed