Changeset 30 for trunk/UFormMain.pas
- Timestamp:
- Mar 4, 2014, 12:18:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r28 r30 34 34 ToolButton4: TToolButton; 35 35 procedure FormActivate(Sender: TObject); 36 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 36 37 procedure FormCreate(Sender: TObject); 37 38 procedure FormDestroy(Sender: TObject); … … 132 133 end; 133 134 135 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 136 begin 137 Core.Game.Running := False; 138 end; 139 134 140 procedure TFormMain.FormDestroy(Sender: TObject); 135 141 begin … … 176 182 end; 177 183 Cell := nil; 178 OldCell := Core.Game.CurrentPlayer. FocusedCell;184 OldCell := Core.Game.CurrentPlayer.View.FocusedCell; 179 185 with Core.Game do 180 186 Cell := Map.PosToCell(CurrentPlayer.View.CanvasToCellPos(Point(X, Y)), CurrentPlayer.View ); 181 187 if Assigned(Cell) then begin 182 Core.Game.CurrentPlayer. FocusedCell := Cell;188 Core.Game.CurrentPlayer.View.FocusedCell := Cell; 183 189 StatusBar1.Panels[0].Text := '[' + IntToStr(Cell.Pos.X) + ', ' + IntToStr(Cell.Pos.Y) + ']'; 184 190 end else begin 185 Core.Game.CurrentPlayer. FocusedCell := nil;191 Core.Game.CurrentPlayer.View.FocusedCell := nil; 186 192 StatusBar1.Panels[0].Text := ''; 187 193 end; … … 195 201 if (Abs(StartMousePoint.X - X) < 5) and (Abs(StartMousePoint.Y - Y) < 5) then begin 196 202 if Core.Game.Running and (Core.Game.CurrentPlayer.Mode = pmHuman) then begin 197 Core.Game.CurrentPlayer. SelectCell(Point(X, Y));203 Core.Game.CurrentPlayer.View.SelectCell(Point(X, Y), Core.Game.CurrentPlayer); 198 204 Redraw; 199 205 end;
Note:
See TracChangeset
for help on using the changeset viewer.