- Timestamp:
- Feb 12, 2014, 9:32:54 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r7 r8 137 137 StartViewPoint := Point(TPlayer(Game.Players[0]).View.Left, TPlayer(Game.Players[0]).View.Top); 138 138 MoveActive := True; 139 TPlayer(Game.Players[0]).SelectCell(Point(X, Y));140 Redraw;141 139 end; 142 140 end; … … 155 153 TPlayer(Game.Players[0]).View.Right - TPlayer(Game.Players[0]).View.Left, 156 154 TPlayer(Game.Players[0]).View.Bottom - TPlayer(Game.Players[0]).View.Top); 157 TPlayer(Game.Players[0]).SelectCell(Point(X, Y));158 155 Redraw; 159 156 end; … … 163 160 Shift: TShiftState; X, Y: Integer); 164 161 begin 162 if (StartMousePoint.X = X) and (StartMousePoint.Y = Y) then begin 163 TPlayer(Game.Players[0]).SelectCell(Point(X, Y)); 164 Redraw; 165 end; 165 166 MoveActive := False; 166 167 end; -
trunk/UGame.pas
r7 r8 110 110 111 111 procedure TPlayer.SelectCell(Pos: TPoint); 112 begin 113 SelectedCell := Game.Map.PosToCell(Pos, View, ViewZoom); 112 var 113 NewSelectedCell: TPoint; 114 begin 115 NewSelectedCell := Game.Map.PosToCell(Pos, View, ViewZoom); 116 if (NewSelectedCell.X = SelectedCell.X) and (NewSelectedCell.Y = SelectedCell.Y) then 117 SelectedCell := Point(-1, -1) 118 else SelectedCell := NewSelectedCell; 114 119 end; 115 120
Note:
See TracChangeset
for help on using the changeset viewer.