Ignore:
Timestamp:
May 23, 2018, 8:53:58 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Each client form is redrawn by itself, not by Core.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.