Changeset 211 for trunk/Forms


Ignore:
Timestamp:
May 23, 2018, 8:53:58 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Each client form is redrawn by itself, not by Core.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormClient.lfm

    r206 r211  
    77  ClientHeight = 621
    88  ClientWidth = 775
    9   DesignTimePPI = 120
     9  DesignTimePPI = 144
    1010  OnClose = FormClose
    1111  OnCreate = FormCreate
     
    1717  object StatusBar1: TStatusBar
    1818    Left = 0
    19     Height = 28
    20     Top = 593
     19    Height = 30
     20    Top = 591
    2121    Width = 775
    2222    Panels = <   
     
    3434  object ToolBar1: TToolBar
    3535    Left = 0
    36     Height = 593
     36    Height = 591
    3737    Top = 0
    3838    Width = 32
     
    7575  object PaintBox1: TPaintBox
    7676    Left = 32
    77     Height = 593
     77    Height = 591
    7878    Top = 0
    7979    Width = 743
  • trunk/Forms/UFormClient.pas

    r207 r211  
    7979    procedure SetClient(AValue: TClient);
    8080    procedure DoClientChange(Sender: TObject);
     81    procedure DoGameEnd(Sender: TObject);
    8182    procedure DoTurnStart(Sender: TObject);
    8283    procedure DoMove(CellFrom, CellTo: TCell; var CountOnce,
     
    231232    FClient.OnTurnStart := DoTurnStart;
    232233    FClient.OnDestroy := DoClientDestroy;
     234    FClient.OnGameEnd := DoGameEnd;
    233235    FClient.View.DestRect := TRect.CreateBounds(TPoint.Create(0, 0), TPoint.Create(PaintBox1.Width, PaintBox1.Height));
    234236  end;
     
    237239
    238240procedure TFormClient.DoClientChange(Sender: TObject);
     241begin
     242  Redraw;
     243end;
     244
     245procedure TFormClient.DoGameEnd(Sender: TObject);
    239246begin
    240247  Redraw;
     
    245252  TurnActive := True;
    246253  Synchronize(UpdateInterface);
     254  Synchronize(Redraw);
    247255end;
    248256
Note: See TracChangeset for help on using the changeset viewer.