Changeset 206
- Timestamp:
- May 21, 2018, 2:50:02 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.lfm
r203 r206 1 1 object FormClient: TFormClient 2 Left = 6622 Left = 528 3 3 Height = 621 4 Top = 4134 Top = 280 5 5 Width = 775 6 6 Caption = 'Client' 7 7 ClientHeight = 621 8 8 ClientWidth = 775 9 DesignTimePPI = 1 449 DesignTimePPI = 120 10 10 OnClose = FormClose 11 11 OnCreate = FormCreate … … 17 17 object StatusBar1: TStatusBar 18 18 Left = 0 19 Height = 3020 Top = 59 119 Height = 28 20 Top = 593 21 21 Width = 775 22 22 Panels = < … … 34 34 object ToolBar1: TToolBar 35 35 Left = 0 36 Height = 59 136 Height = 593 37 37 Top = 0 38 38 Width = 32 … … 75 75 object PaintBox1: TPaintBox 76 76 Left = 32 77 Height = 59 177 Height = 593 78 78 Top = 0 79 79 Width = 743 -
trunk/Forms/UFormClient.pas
r205 r206 217 217 Caption := NewCaption; 218 218 Drawing := False; 219 AGameEndTurn.Enabled := Core.Game.Running;220 219 end; 221 220 end; … … 299 298 TimerPeriod := 0; 300 299 LastTimerTime := Now; 300 Core.CoolTranslator1.TranslateComponentRecursive(Self); 301 301 end; 302 302 -
trunk/Forms/UFormMain.lfm
r203 r206 5 5 Width = 775 6 6 Caption = 'xTactics' 7 ClientHeight = 5 877 ClientHeight = 596 8 8 ClientWidth = 775 9 DesignTimePPI = 1 449 DesignTimePPI = 120 10 10 Menu = MainMenu1 11 11 OnClose = FormClose … … 77 77 object PanelMain: TPanel 78 78 Left = 0 79 Height = 5 4779 Height = 556 80 80 Top = 40 81 81 Width = 775 … … 92 92 object MenuItem2: TMenuItem 93 93 Action = Core.AGameNew 94 Caption = 'New...'95 94 end 96 95 object MenuItem3: TMenuItem … … 108 107 object MenuItem15: TMenuItem 109 108 Action = Core.AGameSave 110 ShortCut = 16467111 109 end 112 110 object MenuItem29: TMenuItem 113 111 Action = Core.AGameSaveAs 114 Caption = 'Save as'115 ShortCut = 24659116 112 end 117 113 object MenuItem5: TMenuItem … … 177 173 object MenuItem23: TMenuItem 178 174 Action = Core.AHelp 175 end 176 object MenuItem4: TMenuItem 177 Action = Core.AShowKeyShortcuts 179 178 end 180 179 object MenuItem17: TMenuItem -
trunk/Forms/UFormMain.pas
r203 r206 44 44 MenuItem28: TMenuItem; 45 45 MenuItem29: TMenuItem; 46 MenuItem4: TMenuItem; 46 47 MenuItemLoadRecent: TMenuItem; 47 48 MenuItem3: TMenuItem; -
trunk/Languages/xtactics.cs.po
r203 r206 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "X-Generator: Poedit 2.0.6\n"11 "X-Generator: Poedit 1.8.8\n" 12 12 "Language: cs\n" 13 13 … … 64 64 #: tcore.agamesaveas.caption 65 65 msgid "Save as..." 66 msgstr " "66 msgstr "Uložit jako..." 67 67 68 68 #: tcore.ahelp.caption … … 93 93 msgstr "Grafy" 94 94 95 #: tcore.ashowkeyshortcuts.caption 96 msgctxt "tcore.ashowkeyshortcuts.caption" 97 msgid "Key shortcuts" 98 msgstr "Klávesové zkratky" 99 95 100 #: tcore.ashowunitmoves.caption 96 101 msgctxt "tcore.ashowunitmoves.caption" … … 191 196 msgstr "Nápověda" 192 197 198 #: tformkeyshortcuts.caption 199 msgctxt "tformkeyshortcuts.caption" 200 msgid "Key shortcuts" 201 msgstr "Klávesové zkratky" 202 203 #: tformkeyshortcuts.listview1.columns[0].caption 204 msgid "Action" 205 msgstr "Akce" 206 207 #: tformkeyshortcuts.listview1.columns[1].caption 208 msgid "Window" 209 msgstr "Okno" 210 211 #: tformkeyshortcuts.listview1.columns[2].caption 212 msgid "Shortcut" 213 msgstr "Zkratka" 214 215 #: tformkeyshortcuts.menuitem1.caption 216 msgid "Execute" 217 msgstr "Vykonat" 218 193 219 #: tformmain.atoolbarbigicons.caption 194 220 msgctxt "tformmain.atoolbarbigicons.caption" … … 236 262 msgstr "Nápověda" 237 263 238 #: tformmain.menuitem2.caption239 msgid "New..."240 msgstr ""241 242 264 #: tformmain.menuitem22.caption 243 265 msgctxt "tformmain.menuitem22.caption" 244 266 msgid "Statusbar visible" 245 267 msgstr "Viditelná stavová lišta" 246 247 #: tformmain.menuitem29.caption248 msgid "Save as"249 msgstr ""250 268 251 269 #: tformmain.menuitem8.caption … … 794 812 "Vyhodnocení útoku jednotek je určen pravidlem podobným tomu, které je použito u hry Risk. Bitva se skládá z několika bojů. Každá boj útočník může použít do 3 jednotek a obránce do 2 jednotek. Počet jednotek pro každou stranu určuje počet kostek. Obě strany házejí jejich kostkami a seřadí je v sestupném pořadí. Každá strana bere jednu kostku s nejvyšší hodnotou. Ten, který má kostku s vyšší hodnotou vyhrává. V případě remízy, vyhrává obránce. Prohrávající ztrácí své jednotky a další pár kostek je vyhodnocen. Tento proces je vypočítáván automaticky a pro každý plánovaný útok je zobrazena odhadovaná pravděpodobnost.\n" 795 813 814 #: uformkeyshortcuts.sglobal 815 msgid "Global" 816 msgstr "Globální" 817 818 #: uformkeyshortcuts.smainform 819 msgid "Main window" 820 msgstr "Hlavní okno" 821 796 822 #: uformmain.sturn 797 823 msgctxt "uformmain.sturn" -
trunk/Languages/xtactics.po
r203 r206 83 83 msgstr "" 84 84 85 #: tcore.ashowkeyshortcuts.caption 86 msgctxt "tcore.ashowkeyshortcuts.caption" 87 msgid "Key shortcuts" 88 msgstr "" 89 85 90 #: tcore.ashowunitmoves.caption 86 91 msgctxt "tcore.ashowunitmoves.caption" … … 181 186 msgstr "" 182 187 188 #: tformkeyshortcuts.caption 189 msgctxt "tformkeyshortcuts.caption" 190 msgid "Key shortcuts" 191 msgstr "" 192 193 #: tformkeyshortcuts.listview1.columns[0].caption 194 msgid "Action" 195 msgstr "" 196 197 #: tformkeyshortcuts.listview1.columns[1].caption 198 msgid "Window" 199 msgstr "" 200 201 #: tformkeyshortcuts.listview1.columns[2].caption 202 msgid "Shortcut" 203 msgstr "" 204 205 #: tformkeyshortcuts.menuitem1.caption 206 msgid "Execute" 207 msgstr "" 208 183 209 #: tformmain.atoolbarbigicons.caption 184 210 msgctxt "tformmain.atoolbarbigicons.caption" … … 226 252 msgstr "" 227 253 228 #: tformmain.menuitem2.caption229 msgid "New..."230 msgstr ""231 232 254 #: tformmain.menuitem22.caption 233 255 msgctxt "tformmain.menuitem22.caption" 234 256 msgid "Statusbar visible" 235 msgstr ""236 237 #: tformmain.menuitem29.caption238 msgid "Save as"239 257 msgstr "" 240 258 … … 773 791 msgstr "" 774 792 793 #: uformkeyshortcuts.sglobal 794 msgid "Global" 795 msgstr "" 796 797 #: uformkeyshortcuts.smainform 798 msgid "Main window" 799 msgstr "" 800 775 801 #: uformmain.sturn 776 802 msgctxt "uformmain.sturn" -
trunk/UCore.lfm
r203 r206 3 3 OnDestroy = DataModuleDestroy 4 4 OldCreateOrder = False 5 Height = 8116 HorizontalOffset = 3307 VerticalOffset = 2288 Width = 1 2589 PPI = 1 4410 object ActionList 1: TActionList5 Height = 676 6 HorizontalOffset = 275 7 VerticalOffset = 190 8 Width = 1048 9 PPI = 120 10 object ActionListMain: TActionList 11 11 Images = ImageListSmall 12 left = 1 3713 top = 6012 left = 114 13 top = 50 14 14 object AExit: TAction 15 15 Caption = 'Exit' … … 95 95 OnExecute = AGameSaveExecute 96 96 end 97 object AShowKeyShortcuts: TAction 98 Caption = 'Key shortcuts' 99 OnExecute = AShowKeyShortcutsExecute 100 end 97 101 end 98 102 object ImageListSmall: TImageList 99 left = 786100 top = 420103 left = 655 104 top = 350 101 105 Bitmap = { 102 106 4C690C00000010000000100000000000000000000000E3AA4BD6E5B35EFFE3B1 … … 490 494 POFilesFolder = 'Languages' 491 495 OnTranslate = CoolTranslator1Translate 492 left = 1 37493 top = 436496 left = 114 497 top = 363 494 498 end 495 499 object ImageListLarge: TImageList 496 500 Height = 32 497 501 Width = 32 498 left = 786499 top = 2 86502 left = 655 503 top = 238 500 504 Bitmap = { 501 505 4C690C0000002000000020000000000000000000000000000000E2AA4B36E2A9 … … 2042 2046 RootName = 'CONFIG' 2043 2047 ReadOnly = False 2044 left = 1 372045 top = 5562048 left = 114 2049 top = 463 2046 2050 end 2047 2051 object OpenDialog1: TOpenDialog 2048 2052 DefaultExt = '.xtmap' 2049 left = 11262050 top = 2 922053 left = 938 2054 top = 243 2051 2055 end 2052 2056 object SaveDialog1: TSaveDialog 2053 2057 DefaultExt = '.xtmap' 2054 left = 11262055 top = 1 662058 left = 938 2059 top = 138 2056 2060 end 2057 2061 object ApplicationInfo: TApplicationInfo … … 2070 2074 RegistryRoot = rrKeyCurrentUser 2071 2075 License = 'CC0' 2072 left = 1 372073 top = 1 802076 left = 114 2077 top = 150 2074 2078 end 2075 2079 object PersistentForm: TPersistentForm 2076 2080 MinVisiblePart = 50 2077 2081 EntireVisible = False 2078 left = 7802079 top = 6002082 left = 650 2083 top = 500 2080 2084 end 2081 2085 object ScaleDPI1: TScaleDPI 2082 2086 AutoDetect = False 2083 left = 1 362084 top = 6762087 left = 113 2088 top = 563 2085 2089 end 2086 2090 object LastOpenedList1: TLastOpenedList 2087 2091 MaxCount = 10 2088 2092 OnChange = LastOpenedList1Change 2089 left = 1 372090 top = 3002093 left = 114 2094 top = 250 2091 2095 end 2092 2096 end -
trunk/UCore.pas
r203 r206 17 17 TCore = class(TDataModule) 18 18 AAbout: TAction; 19 AShowKeyShortcuts: TAction; 19 20 AGameSave: TAction; 20 21 APlayersStats: TAction; … … 27 28 ApplicationInfo: TApplicationInfo; 28 29 ASettings: TAction; 29 ActionList 1: TActionList;30 ActionListMain: TActionList; 30 31 AExit: TAction; 31 32 AGameEnd: TAction; … … 55 56 procedure ASettingsExecute(Sender: TObject); 56 57 procedure AShowChartsExecute(Sender: TObject); 58 procedure AShowKeyShortcutsExecute(Sender: TObject); 57 59 procedure AShowUnitMovesExecute(Sender: TObject); 58 60 procedure CoolTranslator1Translate(Sender: TObject); … … 81 83 procedure RedrawClients; 82 84 procedure UpdateOtherForms; 85 procedure FormClientActions; 83 86 public 84 87 Game: TGame; … … 109 112 110 113 uses 111 UFormMain, UFormNew, UFormSettings, UFormAbout, UClientAI, 114 UFormMain, UFormNew, UFormSettings, UFormAbout, UClientAI, UFormKeyShortcuts, 112 115 UFormHelp, UFormCharts, UFormUnitMoves, UFormPlayersStats; 113 116 … … 373 376 end; 374 377 378 procedure TCore.AShowKeyShortcutsExecute(Sender: TObject); 379 begin 380 if not Assigned(FormKeyShortcuts) then FormKeyShortcuts := TFormKeyShortcuts.Create(nil); 381 FormKeyShortcuts.Show; 382 end; 383 375 384 procedure TCore.AShowUnitMovesExecute(Sender: TObject); 376 385 begin … … 382 391 begin 383 392 UGame.InitStrings; 393 CoolTranslator1.TranslateComponentRecursive(FormClient); 384 394 end; 385 395 … … 409 419 if Assigned(FormUnitMoves) then FreeAndNil(FormUnitMoves); 410 420 if Assigned(FormCharts) then FreeAndNil(FormCharts); 421 if Assigned(FormKeyShortcuts) then FreeAndNil(FormKeyShortcuts); 411 422 FreeAndNil(FormClients); 412 423 FreeAndNil(StoredDimension); … … 431 442 Player: TPlayer; 432 443 NewClient: TClient; 444 ServerClient: TServerClient; 433 445 begin 434 446 GameLoaded := True; … … 473 485 RedrawClients; 474 486 UpdateOtherForms; 487 UpdateActions; 488 ServerClient := Server.Clients.SearchByPlayer(Game.CurrentPlayer); 489 if Assigned(ServerClient) then ServerClient.TurnStart 490 else raise Exception.Create('Server client for current player not found.'); 475 491 end; 476 492 … … 489 505 if Assigned(FormUnitMoves) and FormUnitMoves.Visible then FormUnitMoves.ReloadList; 490 506 if Assigned(FormPlayersStats) and FormPlayersStats.Visible then FormPlayersStats.ReloadList; 507 end; 508 509 procedure TCore.FormClientActions; 510 var 511 Action: TAction; 512 I: Integer; 513 begin 514 for I := 0 to FormClient.ActionList1.ActionCount - 1 do begin 515 Action := TAction.Create(FormMain); 516 Action.Assign(TAction(FormClient.ActionList1.Actions[I])); 517 Action.ActionList := FormMain.ActionList1; 518 end; 491 519 end; 492 520 … … 597 625 LoadGame(LastOpenedList1.Items[0]); 598 626 ScaleDPI; 627 FormClientActions; 599 628 600 629 if Game.FileName = '' then StartNewGame; -
trunk/xtactics.lpi
r203 r206 104 104 </Item7> 105 105 </RequiredPackages> 106 <Units Count="2 8">106 <Units Count="29"> 107 107 <Unit0> 108 108 <Filename Value="xtactics.lpr"/> … … 259 259 <IsPartOfProject Value="True"/> 260 260 </Unit27> 261 <Unit28> 262 <Filename Value="Forms/UFormKeyShortcuts.pas"/> 263 <IsPartOfProject Value="True"/> 264 <ComponentName Value="FormKeyShortcuts"/> 265 <HasResources Value="True"/> 266 <ResourceBaseClass Value="Form"/> 267 </Unit28> 261 268 </Units> 262 269 </ProjectOptions> … … 291 298 <Linking> 292 299 <Debugging> 300 <UseHeaptrc Value="True"/> 293 301 <UseExternalDbgSyms Value="True"/> 294 302 </Debugging>
Note:
See TracChangeset
for help on using the changeset viewer.