- Timestamp:
- Sep 22, 2018, 9:37:16 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 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; -
trunk/Languages/xtactics.cs.po
r245 r249 226 226 msgstr "Vykonat" 227 227 228 #: tformmain.astatusbarvisible.caption 229 msgid "Status bar visible" 230 msgstr "Viditelná stavová lišta" 231 228 232 #: tformmain.atoolbarbigicons.caption 229 233 msgctxt "tformmain.atoolbarbigicons.caption" … … 270 274 msgid "Help" 271 275 msgstr "Nápověda" 272 273 #: tformmain.menuitem22.caption274 msgctxt "tformmain.menuitem22.caption"275 msgid "Statusbar visible"276 msgstr "Viditelná stavová lišta"277 276 278 277 #: tformmain.menuitem8.caption -
trunk/Languages/xtactics.po
r245 r249 216 216 msgstr "" 217 217 218 #: tformmain.astatusbarvisible.caption 219 msgid "Status bar visible" 220 msgstr "" 221 218 222 #: tformmain.atoolbarbigicons.caption 219 223 msgctxt "tformmain.atoolbarbigicons.caption" … … 259 263 msgctxt "tformmain.menuitem16.caption" 260 264 msgid "Help" 261 msgstr ""262 263 #: tformmain.menuitem22.caption264 msgctxt "tformmain.menuitem22.caption"265 msgid "Statusbar visible"266 265 msgstr "" 267 266 -
trunk/UCore.lfm
r243 r249 3 3 OnDestroy = DataModuleDestroy 4 4 OldCreateOrder = False 5 Height = 6766 HorizontalOffset = 3537 VerticalOffset = 3 128 Width = 1 0489 PPI = 1 205 Height = 811 6 HorizontalOffset = 424 7 VerticalOffset = 374 8 Width = 1258 9 PPI = 144 10 10 object ActionListMain: TActionList 11 11 Images = ImageListSmall 12 left = 1 1413 top = 5012 left = 137 13 top = 60 14 14 object AExit: TAction 15 15 Caption = 'Exit' … … 105 105 end 106 106 object ImageListSmall: TImageList 107 left = 655108 top = 350107 left = 786 108 top = 420 109 109 Bitmap = { 110 110 4C690C00000010000000100000000000000000000000E3AA4BD6E5B35EFFE3B1 … … 498 498 POFilesFolder = 'Languages' 499 499 OnTranslate = CoolTranslator1Translate 500 left = 1 14501 top = 363500 left = 137 501 top = 436 502 502 end 503 503 object ImageListLarge: TImageList 504 504 Height = 32 505 505 Width = 32 506 left = 655507 top = 2 38506 left = 786 507 top = 286 508 508 Bitmap = { 509 509 4C690C0000002000000020000000000000000000000000000000E2AA4B36E2A9 … … 2050 2050 RootName = 'CONFIG' 2051 2051 ReadOnly = False 2052 left = 1 142053 top = 4632052 left = 137 2053 top = 556 2054 2054 end 2055 2055 object OpenDialog1: TOpenDialog 2056 2056 DefaultExt = '.xtmap' 2057 left = 9382058 top = 2 432057 left = 1126 2058 top = 292 2059 2059 end 2060 2060 object SaveDialog1: TSaveDialog 2061 2061 DefaultExt = '.xtmap' 2062 left = 9382063 top = 1 382062 left = 1126 2063 top = 166 2064 2064 end 2065 2065 object ApplicationInfo: TApplicationInfo … … 2074 2074 AuthorsName = 'Chronos' 2075 2075 AppName = 'xTactics' 2076 ReleaseDate = 43 2932076 ReleaseDate = 43365 2077 2077 RegistryKey = '\Software\xTactics' 2078 2078 RegistryRoot = rrKeyCurrentUser 2079 2079 License = 'CC0' 2080 left = 1 142081 top = 1 502080 left = 137 2081 top = 180 2082 2082 end 2083 2083 object PersistentForm: TPersistentForm 2084 2084 MinVisiblePart = 50 2085 2085 EntireVisible = False 2086 left = 6502087 top = 5002086 left = 780 2087 top = 600 2088 2088 end 2089 2089 object ScaleDPI1: TScaleDPI 2090 2090 AutoDetect = False 2091 left = 1 132092 top = 5632091 left = 136 2092 top = 676 2093 2093 end 2094 2094 object LastOpenedList1: TLastOpenedList 2095 2095 MaxCount = 10 2096 2096 OnChange = LastOpenedList1Change 2097 left = 1 142098 top = 2502097 left = 137 2098 top = 300 2099 2099 end 2100 2100 object ThemeManager1: TThemeManager 2101 left = 3372102 top = 2702101 left = 404 2102 top = 324 2103 2103 end 2104 2104 end -
trunk/UCore.pas
r243 r249 228 228 I: Integer; 229 229 begin 230 {$ifdef DEBUG}230 //{$ifdef DEBUG} 231 231 with Core.ScaleDPI1 do begin 232 232 //DesignDPI := Point(144, 144); … … 243 243 end; 244 244 end; 245 {$endif}245 //{$endif} 246 246 end; 247 247 … … 433 433 FormClients := TFPGObjectList<TFormClient>.Create; 434 434 ServerList := TServerList.Create; 435 436 {$IFDEF Linux} 437 // If installed in Linux system then use installation directory for po files 438 if Application.ExeName = '/usr/bin/xtactics' then 439 CoolTranslator1.POFilesFolder := '/usr/share/xtactics/languages'; 440 {$ENDIF} 435 441 end; 436 442 … … 637 643 begin 638 644 if not Core.Initialized then begin 639 {$IFDEF Linux}640 // If installed in Linux system then use installation directory for po files641 if Application.ExeName = '/usr/bin/xtactics' then642 CoolTranslator1.POFilesFolder := '/usr/share/xtactics/languages';643 {$ENDIF}644 645 FInitialized := True; 645 646
Note:
See TracChangeset
for help on using the changeset viewer.