hedgewars/uWorld.pas
changeset 2762 2fbc8d35eb52
parent 2747 7889a3a9724f
child 2765 8a5685581aeb
equal deleted inserted replaced
2761:1467c7298b10 2762:2fbc8d35eb52
   165 						begin
   165 						begin
   166 						DrawSprite(sprAMAmmosBW, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1);
   166 						DrawSprite(sprAMAmmosBW, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1);
   167 						DrawSprite(sprTurnsLeft, x + g * 33 + 51, y + 17, l);
   167 						DrawSprite(sprTurnsLeft, x + g * 33 + 51, y + 17, l);
   168 						end else
   168 						end else
   169 						DrawSprite(sprAMAmmos, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1);
   169 						DrawSprite(sprAMAmmos, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1);
   170 
       
   171 					if (Slot = i)
   170 					if (Slot = i)
   172 					and (CursorPoint.X >= x + g * 33 + 35)
   171 					and (CursorPoint.X >= x + g * 33 + 35)
   173 					and (CursorPoint.X < x + g * 33 + 68) then
   172 					and (CursorPoint.X < x + g * 33 + 68) then
   174 						begin
   173 						begin
   175 						if (l < 0) then DrawSprite(sprAMSelection, x + g * 33 + 35, y + 1, 0);
   174 						if (l < 0) then DrawSprite(sprAMSelection, x + g * 33 + 35, y + 1, 0);
   699 	SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y);
   698 	SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y);
   700 	CursorPoint.X:= CursorPoint.X - (cScreenWidth shr 1);
   699 	CursorPoint.X:= CursorPoint.X - (cScreenWidth shr 1);
   701 	CursorPoint.Y:= cScreenHeight - CursorPoint.Y;
   700 	CursorPoint.Y:= cScreenHeight - CursorPoint.Y;
   702 	end;
   701 	end;
   703 
   702 
   704 if (FollowGear <> nil) and (not isCursorVisible) and (not fastUntilLag) then
   703 if (not PlacingHogs) and (FollowGear <> nil) and (not isCursorVisible) and (not fastUntilLag) then
   705 	if abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y) > 4 then
   704 	if abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y) > 4 then
   706 		begin
   705 		begin
   707 		FollowGear:= nil;
   706 		FollowGear:= nil;
   708 		prevPoint:= CursorPoint;
   707 		prevPoint:= CursorPoint;
   709 		exit
   708 		exit