- Timestamp:
- May 20, 2018, 11:19:57 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r203 r205 82 82 procedure DoMove(CellFrom, CellTo: TCell; var CountOnce, 83 83 CountRepeat: Integer; Update: Boolean; var Confirm: Boolean); 84 procedure SetToolbarHints; 85 procedure DoClientDestroy(Sender: TObject); 84 86 public 85 87 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 104 106 105 107 { TFormClient } 108 109 procedure TFormClient.SetToolbarHints; 110 var 111 I: Integer; 112 begin 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; 117 end; 118 119 procedure TFormClient.DoClientDestroy(Sender: TObject); 120 begin 121 Client := nil; 122 end; 106 123 107 124 procedure TFormClient.DoMove(CellFrom, CellTo: TCell; var CountOnce, … … 213 230 FClient.OnChange := DoClientChange; 214 231 FClient.OnMove := DoMove; 215 FClient.OnTurnStart := DoTurnStart(); 232 FClient.OnTurnStart := DoTurnStart; 233 FClient.OnDestroy := DoClientDestroy; 216 234 end; 217 235 Redraw; … … 375 393 procedure TFormClient.FormShow(Sender: TObject); 376 394 begin 395 SetToolbarHints; 377 396 LoadConfig(Core.XMLConfig1, 'FormClient'); 378 397 Core.PersistentForm.Load(Self); -
trunk/UGame.pas
r204 r205 3057 3057 Players[I].PlayerMap.CheckVisibility; 3058 3058 end; 3059 Map.ComputePlayerStats; 3059 3060 Running := ReadBoolean(RootNode, 'Running', True); 3060 3061 end; -
trunk/UGameClient.pas
r203 r205 20 20 FControlPlayer: TPlayer; 21 21 FOnChange: TNotifyEvent; 22 FOnDestroy: TNotifyEvent; 22 23 FOnReceive: TCommandEvent; 23 24 FOnMove: TMoveEvent; … … 48 49 property Game: TGame read FGame write SetGame; 49 50 property Form: TForm read FForm write SetForm; 51 property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; 50 52 property OnMove: TMoveEvent read FOnMove write SetOnMove; 51 53 property OnReceive: TCommandEvent read FOnReceive write FOnReceive; … … 193 195 destructor TClient.Destroy; 194 196 begin 197 Form := nil; 195 198 ControlPlayer := nil; 196 199 FreeAndNil(View);
Note:
See TracChangeset
for help on using the changeset viewer.