equal
deleted
inserted
replaced
679 {$ENDIF} |
679 {$ENDIF} |
680 for t:=0 to cMaxSlotAmmoIndex do |
680 for t:=0 to cMaxSlotAmmoIndex do |
681 if (Ammo^[i, t].Count > 0) and (Ammo^[i, t].AmmoType <> amNothing) then |
681 if (Ammo^[i, t].Count > 0) and (Ammo^[i, t].AmmoType <> amNothing) then |
682 begin |
682 begin |
683 if (CursorPoint.Y <= (cScreenHeight - AmmoRect.y) - ( c * (AMSlotSize+1))) and |
683 if (CursorPoint.Y <= (cScreenHeight - AmmoRect.y) - ( c * (AMSlotSize+1))) and |
684 (CursorPoint.Y >= (cScreenHeight - AmmoRect.y) - ((c+1) * (AMSlotSize+1))) and |
684 (CursorPoint.Y > (cScreenHeight - AmmoRect.y) - ((c+1) * (AMSlotSize+1))) and |
685 (CursorPoint.X >= AmmoRect.x + ( g * (AMSlotSize+1))) and |
685 (CursorPoint.X > AmmoRect.x + ( g * (AMSlotSize+1))) and |
686 (CursorPoint.X <= AmmoRect.x + ((g+1) * (AMSlotSize+1))) then |
686 (CursorPoint.X <= AmmoRect.x + ((g+1) * (AMSlotSize+1))) then |
687 begin |
687 begin |
688 Slot:= i; |
688 Slot:= i; |
689 Pos:= t; |
689 Pos:= t; |
690 STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber; |
690 STurns:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber; |
1670 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then |
1670 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then |
1671 exit; |
1671 exit; |
1672 |
1672 |
1673 if (AMState = AMShowingUp) or (AMState = AMShowing) then |
1673 if (AMState = AMShowingUp) or (AMState = AMShowing) then |
1674 begin |
1674 begin |
1675 if CursorPoint.X < AmmoRect.x then//check left |
1675 if CursorPoint.X < AmmoRect.x + AMSlotSize then//check left |
1676 CursorPoint.X:= AmmoRect.x; |
1676 CursorPoint.X:= AmmoRect.x + AMSlotSize; |
1677 if CursorPoint.X > AmmoRect.x + AmmoRect.w then//check right |
1677 if CursorPoint.X > AmmoRect.x + AmmoRect.w then//check right |
1678 CursorPoint.X:= AmmoRect.x + AmmoRect.w; |
1678 CursorPoint.X:= AmmoRect.x + AmmoRect.w; |
1679 if CursorPoint.Y > cScreenHeight - AmmoRect.y then//check top |
1679 if CursorPoint.Y > cScreenHeight - AmmoRect.y then//check top |
1680 CursorPoint.Y:= cScreenHeight - AmmoRect.y; |
1680 CursorPoint.Y:= cScreenHeight - AmmoRect.y; |
1681 if CursorPoint.Y < cScreenHeight - (AmmoRect.y + AmmoRect.h - AMSlotSize - 2) then//check bottom |
1681 if CursorPoint.Y < cScreenHeight - (AmmoRect.y + AmmoRect.h - AMSlotSize - 2) then//check bottom |