Changeset 249 for trunk/Forms
- Timestamp:
- Sep 22, 2018, 9:37:16 PM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.lfm
r245 r249 124 124 Caption = 'Toolbar big icons' 125 125 OnExecute = AToolBarBigIconsExecute 126 OnUpdate = AToolBarBigIconsUpdate 126 127 end 127 128 object AToolBarVisible: TAction 128 129 Caption = 'Toolbar visible' 129 130 OnExecute = AToolBarVisibleExecute 131 OnUpdate = AToolBarVisibleUpdate 130 132 end 131 133 object AStatusBarVisible: TAction 132 134 Caption = 'Statusbar visible' 133 135 OnExecute = AStatusBarVisibleExecute 136 OnUpdate = AStatusBarVisibleUpdate 134 137 end 135 138 object AGameEndTurn: TAction -
trunk/Forms/UFormClient.pas
r248 r249 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 9 UGame, LCLType, Menus, ActnList, ComCtrls, dateutils, XMLConf, DOM, Math, 10 UGeometry, UGameClient, UGameProtocol, UThreading, UPlayer, UClientGUI ;10 UGeometry, UGameClient, UGameProtocol, UThreading, UPlayer, UClientGUI, UFormMain; 11 11 12 12 const … … 44 44 procedure AGameEndTurnExecute(Sender: TObject); 45 45 procedure AStatusBarVisibleExecute(Sender: TObject); 46 procedure AStatusBarVisibleUpdate(Sender: TObject); 46 47 procedure ASurrenderExecute(Sender: TObject); 47 48 procedure AToolBarBigIconsExecute(Sender: TObject); 49 procedure AToolBarBigIconsUpdate(Sender: TObject); 48 50 procedure AToolBarVisibleExecute(Sender: TObject); 51 procedure AToolBarVisibleUpdate(Sender: TObject); 49 52 procedure AZoomAllExecute(Sender: TObject); 50 53 procedure AZoomInExecute(Sender: TObject); … … 92 95 procedure DoClientDestroy(Sender: TObject); 93 96 public 97 FormMain: TFormMain; 94 98 procedure LoadConfig(Config: TXmlConfig; Path: string); 95 99 procedure SaveConfig(Config: TXmlConfig; Path: string); … … 416 420 begin 417 421 AToolBarBigIcons.Checked := not AToolBarBigIcons.Checked; 422 end; 423 424 procedure TFormClient.AToolBarBigIconsUpdate(Sender: TObject); 425 begin 418 426 UpdateInterface; 419 427 end; … … 422 430 begin 423 431 AStatusBarVisible.Checked := not AStatusBarVisible.Checked; 432 UpdateInterface; 433 end; 434 435 procedure TFormClient.AStatusBarVisibleUpdate(Sender: TObject); 436 begin 424 437 UpdateInterface; 425 438 end; … … 444 457 begin 445 458 AToolBarVisible.Checked := not AToolBarVisible.Checked; 459 UpdateInterface; 460 end; 461 462 procedure TFormClient.AToolBarVisibleUpdate(Sender: TObject); 463 begin 446 464 UpdateInterface; 447 465 end; -
trunk/Forms/UFormMain.lfm
r243 r249 1 1 object FormMain: TFormMain 2 Left = 8 012 Left = 826 3 3 Height = 621 4 Top = 3524 Top = 419 5 5 Width = 775 6 6 Caption = 'xTactics' 7 ClientHeight = 5 967 ClientHeight = 587 8 8 ClientWidth = 775 9 DesignTimePPI = 1 209 DesignTimePPI = 144 10 10 Menu = MainMenu1 11 11 OnActivate = FormActivate … … 79 79 object PanelMain: TPanel 80 80 Left = 0 81 Height = 5 5681 Height = 547 82 82 Top = 40 83 83 Width = 775 … … 147 147 end 148 148 object MenuItem22: TMenuItem 149 Caption = 'Statusbar visible'149 Action = AStatusBarVisible 150 150 end 151 151 object MenuItem26: TMenuItem … … 208 208 OnExecute = AToolBarVisibleExecute 209 209 end 210 object AStatusBarVisible: TAction 211 Caption = 'Status bar visible' 212 OnExecute = AStatusBarVisibleExecute 213 end 210 214 end 211 215 object PopupMenuToolbar: TPopupMenu -
trunk/Forms/UFormMain.pas
r243 r249 18 18 19 19 TFormMain = class(TForm) 20 AStatusBarVisible: TAction; 20 21 AToolBarVisible: TAction; 21 22 AToolBarBigIcons: TAction; … … 67 68 ToolButton5: TToolButton; 68 69 ToolButton9: TToolButton; 70 procedure AStatusBarVisibleExecute(Sender: TObject); 69 71 procedure AToolBarBigIconsExecute(Sender: TObject); 70 72 procedure AToolBarVisibleExecute(Sender: TObject); … … 80 82 FormActivated: Boolean; 81 83 procedure ApplicationStart(Ptr: IntPtr); 84 procedure UpdateClientForms; 82 85 public 83 86 procedure LoadConfig(Config: TXmlConfig; Path: string); … … 121 124 AToolBarBigIcons.Checked := GetValue(DOMString(Path + '/LargeIcons'), False); 122 125 AToolBarVisible.Checked := GetValue(DOMString(Path + '/ToolBarVisible'), True); 126 AStatusBarVisible.Checked := GetValue(DOMString(Path + '/StatusBarVisible'), False); 123 127 end; 124 128 end; … … 129 133 SetValue(DOMString(Path + '/LargeIcons'), AToolBarBigIcons.Checked); 130 134 SetValue(DOMString(Path + '/ToolBarVisible'), AToolBarVisible.Checked); 135 SetValue(DOMString(Path + '/StatusBarVisible'), AStatusBarVisible.Checked); 131 136 end; 132 137 end; … … 164 169 end; 165 170 171 procedure TFormMain.AStatusBarVisibleExecute(Sender: TObject); 172 begin 173 AStatusBarVisible.Checked := not AStatusBarVisible.Checked; 174 UpdateClientForms; 175 end; 176 166 177 procedure TFormMain.AToolBarBigIconsExecute(Sender: TObject); 167 178 begin 168 179 AToolBarBigIcons.Checked := not AToolBarBigIcons.Checked; 169 180 ReloadView; 181 UpdateClientForms; 170 182 end; 171 183 … … 174 186 AToolBarVisible.Checked := not AToolBarVisible.Checked; 175 187 ReloadView; 188 UpdateClientForms; 176 189 end; 177 190 … … 206 219 begin 207 220 Core.ReopenGameOnInit; 221 end; 222 223 procedure TFormMain.UpdateClientForms; 224 var 225 I: Integer; 226 begin 227 FormClient.AToolBarBigIcons.Checked := AToolBarBigIcons.Checked; 228 FormClient.AToolBarBigIcons.Update; 229 FormClient.AToolBarVisible.Checked := AToolBarVisible.Checked; 230 FormClient.AToolBarVisible.Update; 231 FormClient.AStatusBarVisible.Checked := AStatusBarVisible.Checked; 232 FormClient.AStatusBarVisible.Update; 233 for I := 0 to Core.FormClients.Count - 1 do begin 234 Core.FormClients[I].AToolBarBigIcons.Checked := AToolBarBigIcons.Checked; 235 Core.FormClients[I].AToolBarBigIcons.Update; 236 Core.FormClients[I].AToolBarVisible.Checked := AToolBarVisible.Checked; 237 Core.FormClients[I].AToolBarVisible.Update; 238 Core.FormClients[I].AStatusBarVisible.Checked := AStatusBarVisible.Checked; 239 Core.FormClients[I].AStatusBarVisible.Update; 240 end; 208 241 end; 209 242 … … 218 251 ReloadView; 219 252 FormClient.Show; 253 UpdateClientForms; 220 254 Application.QueueAsyncCall(ApplicationStart, 0); 221 255 end;
Note:
See TracChangeset
for help on using the changeset viewer.