Changeset 223 for trunk/Forms
- Timestamp:
- Jul 14, 2018, 7:21:43 PM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.lfm
r221 r223 7 7 ClientHeight = 621 8 8 ClientWidth = 775 9 DesignTimePPI = 1 209 DesignTimePPI = 144 10 10 OnClose = FormClose 11 11 OnCreate = FormCreate … … 13 13 OnKeyUp = FormKeyUp 14 14 OnShow = FormShow 15 LCLVersion = '1.8. 2.0'15 LCLVersion = '1.8.4.0' 16 16 WindowState = wsMaximized 17 17 object StatusBar1: TStatusBar 18 18 Left = 0 19 Height = 2820 Top = 59 319 Height = 30 20 Top = 591 21 21 Width = 775 22 22 Panels = < … … 34 34 object ToolBar1: TToolBar 35 35 Left = 0 36 Height = 59 336 Height = 591 37 37 Top = 0 38 38 Width = 32 … … 80 80 object PaintBox1: TPaintBox 81 81 Left = 32 82 Height = 59 382 Height = 591 83 83 Top = 0 84 84 Width = 743 -
trunk/Forms/UFormClient.pas
r222 r223 85 85 procedure DoNextPlayer(Sender: TObject); 86 86 procedure DoTurnStart(Sender: TObject); 87 procedure DoMove(CellFrom, CellTo: T Cell; var CountOnce,87 procedure DoMove(CellFrom, CellTo: TPlayerCell; var CountOnce, 88 88 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); 89 89 procedure SetToolbarHints; … … 129 129 end; 130 130 131 procedure TFormClient.DoMove(CellFrom, CellTo: T Cell; var CountOnce,131 procedure TFormClient.DoMove(CellFrom, CellTo: TPlayerCell; var CountOnce, 132 132 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); 133 133 var … … 146 146 FormMove.TrackBarRepeat.Max := FormMove.SpinEditRepeat.MaxValue; 147 147 FormMove.TrackBarRepeat.Position := FormMove.SpinEditRepeat.Value; 148 FormMove.DefendCount := CellTo. Power;148 FormMove.DefendCount := CellTo.MapCell.Power; 149 149 // Attack count from other surrounding cells without current move if already exists 150 150 FormMove.AttackCount := 0; … … 152 152 if TUnitMove(CellTo.MovesTo[I]).CellFrom <> CellFrom then 153 153 FormMove.AttackCount := FormMove.AttackCount + TUnitMove(CellTo.MovesTo[I]).CountOnce; 154 FormMove.ShowWinProbability := CellTo. Player <> CellFrom.Player;154 FormMove.ShowWinProbability := CellTo.MapCell.Player <> CellFrom.MapCell.Player; 155 155 156 156 if FormMove.ShowModal = mrOk then begin … … 456 456 Y: Integer); 457 457 var 458 Cell: T Cell;459 OldCell: T Cell;458 Cell: TPlayerCell; 459 OldCell: TPlayerCell; 460 460 CellPos: TPoint; 461 461 begin … … 473 473 OldCell := Client.View.FocusedCell; 474 474 with Core.Game do 475 Cell := Map.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 475 if Assigned(Client.ControlPlayer) then 476 Cell := Client.ControlPlayer.PlayerMap.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 477 //else Cell := Client.Game.Map.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 476 478 if Assigned(Cell) then begin 477 479 Client.View.FocusedCell := Cell; 478 StatusBar1.Panels[0].Text := '[' + IntToStr(Cell. PosPx.X) + ', ' + IntToStr(Cell.PosPx.Y) +479 '] (' + IntToStr(Cell.MovesFrom.Count) + ', ' + IntToStr(Cell.MovesTo.Count) + ') ' + IntToStr(Cell. Id);480 StatusBar1.Panels[0].Text := '[' + IntToStr(Cell.MapCell.PosPx.X) + ', ' + IntToStr(Cell.MapCell.PosPx.Y) + 481 '] (' + IntToStr(Cell.MovesFrom.Count) + ', ' + IntToStr(Cell.MovesTo.Count) + ') ' + IntToStr(Cell.MapCell.Id); 480 482 end else begin 481 483 Client.View.FocusedCell := nil;
Note:
See TracChangeset
for help on using the changeset viewer.