Changeset 231 for trunk/Forms/UFormClient.pas
- Timestamp:
- Sep 19, 2018, 2:05:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r227 r231 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 9 UGame, LCLType, Menus, ActnList, ComCtrls, dateutils, XMLConf, DOM, 10 UGeometry, UGameClient, UGameProtocol, UThreading ;10 UGeometry, UGameClient, UGameProtocol, UThreading, UPlayer, UClientGUI; 11 11 12 12 const … … 69 69 procedure Timer1Timer(Sender: TObject); 70 70 private 71 FClient: TClient ;71 FClient: TClientGUI; 72 72 TempBitmap: TBitmap; 73 73 StartMousePoint: TPoint; … … 80 80 TimerPeriod: TDateTime; 81 81 TurnActive: Boolean; 82 procedure SetClient(AValue: TClient );82 procedure SetClient(AValue: TClientGUI); 83 83 procedure DoClientChange(Sender: TObject); 84 84 procedure DoGameEnd(Sender: TObject); … … 94 94 procedure UpdateInterface; 95 95 procedure Redraw; 96 property Client: TClient read FClient write SetClient;96 property Client: TClientGUI read FClient write SetClient; 97 97 end; 98 98 … … 178 178 TempBitmap.Canvas.Brush.Color := BackGroundColor; //clBackground; //PaintBox1.GetColorResolvingParent; 179 179 TempBitmap.Canvas.FillRect(0, 0, PaintBox1.Width, PaintBox1.Height); 180 if Assigned(ControlPlayer) then ControlPlayer.Paint(TempBitmap.Canvas, View) 181 else Core.Game.Map.Paint(TempBitmap.Canvas, View); 180 Client.Paint(TempBitmap.Canvas, View); 182 181 PaintBox1.Canvas.Draw(0, 0, TempBitmap); 183 182 end else begin … … 186 185 PaintBox1.Canvas.FillRect(0, 0, PaintBox1.Width, PaintBox1.Height); 187 186 {$endif} 188 if Assigned(ControlPlayer) then ControlPlayer.Paint(PaintBox1.Canvas, View) 189 else Core.Game.Map.Paint(PaintBox1.Canvas, View); 187 Client.Paint(PaintBox1.Canvas, View) 190 188 end; 191 189 end; … … 227 225 end; 228 226 229 procedure TFormClient.SetClient(AValue: TClient );227 procedure TFormClient.SetClient(AValue: TClientGUI); 230 228 begin 231 229 if FClient = AValue then Exit; … … 474 472 with Core.Game do 475 473 if Assigned(Client.ControlPlayer) then 476 Cell := Client.ControlPlayer.PlayerMap.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)) , Client.View);474 Cell := Client.ControlPlayer.PlayerMap.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y))); 477 475 //else Cell := Client.Game.Map.PosToCell(Client.View.CanvasToCellPos(TPoint.Create(X, Y)), Client.View); 478 476 if Assigned(Cell) then begin
Note:
See TracChangeset
for help on using the changeset viewer.