Changeset 205 for trunk/Forms


Ignore:
Timestamp:
May 20, 2018, 11:19:57 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Show correctly units move dialog after new game is created.
  • Fixed: Missing hints in client form toolbar.
  • Fixed: Recalculate players stats after game was loaded from file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormClient.pas

    r203 r205  
    8282    procedure DoMove(CellFrom, CellTo: TCell; var CountOnce,
    8383      CountRepeat: Integer; Update: Boolean; var Confirm: Boolean);
     84    procedure SetToolbarHints;
     85    procedure DoClientDestroy(Sender: TObject);
    8486  public
    8587    procedure LoadConfig(Config: TXmlConfig; Path: string);
     
    104106
    105107{ TFormClient }
     108
     109procedure TFormClient.SetToolbarHints;
     110var
     111  I: Integer;
     112begin
     113  for I := 0 to ToolBar1.ButtonCount - 1 do begin
     114    ToolBar1.Buttons[I].ShowHint := True;
     115    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
     116  end;
     117end;
     118
     119procedure TFormClient.DoClientDestroy(Sender: TObject);
     120begin
     121  Client := nil;
     122end;
    106123
    107124procedure TFormClient.DoMove(CellFrom, CellTo: TCell; var CountOnce,
     
    213230    FClient.OnChange := DoClientChange;
    214231    FClient.OnMove := DoMove;
    215     FClient.OnTurnStart := DoTurnStart();
     232    FClient.OnTurnStart := DoTurnStart;
     233    FClient.OnDestroy := DoClientDestroy;
    216234  end;
    217235  Redraw;
     
    375393procedure TFormClient.FormShow(Sender: TObject);
    376394begin
     395  SetToolbarHints;
    377396  LoadConfig(Core.XMLConfig1, 'FormClient');
    378397  Core.PersistentForm.Load(Self);
Note: See TracChangeset for help on using the changeset viewer.