Changeset 195
- Timestamp:
- May 15, 2018, 4:30:54 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormSettings.lfm
r145 r195 10 10 Constraints.MinHeight = 327 11 11 Constraints.MinWidth = 554 12 DesignTimePPI = 120 12 13 OnCreate = FormCreate 13 14 OnShow = FormShow 14 15 Position = poMainFormCenter 15 LCLVersion = '1.8. 0.4'16 LCLVersion = '1.8.2.0' 16 17 object ButtonOk: TButton 17 18 Left = 444 … … 47 48 object TabSheetGeneral: TTabSheet 48 49 Caption = 'General' 49 ClientHeight = 2 2050 ClientWidth = 5 4050 ClientHeight = 231 51 ClientWidth = 538 51 52 object Label2: TLabel 52 Left = 2 753 Height = 2 653 Left = 20 54 Height = 20 54 55 Top = 78 55 Width = 1 5056 Width = 116 56 57 Caption = 'Animation speed:' 57 58 ParentColor = False … … 59 60 object SpinEditAnimSpeed: TSpinEdit 60 61 Left = 232 61 Height = 3662 Height = 28 62 63 Top = 72 63 64 Width = 122 … … 66 67 object Label3: TLabel 67 68 Left = 368 68 Height = 2 669 Height = 20 69 70 Top = 82 70 Width = 1 571 Width = 12 71 72 Caption = '%' 72 73 ParentColor = False 73 74 end 74 75 object CheckBoxAutoSaveTurn: TCheckBox 75 Left = 876 Left = 20 76 77 Height = 27 77 78 Top = 112 78 Width = 58 679 Width = 584 79 80 Anchors = [akTop, akLeft, akRight] 80 81 AutoSize = False … … 84 85 object Label1: TLabel 85 86 Left = 20 86 Height = 2 687 Height = 20 87 88 Top = 26 88 Width = 8889 Width = 68 89 90 Caption = 'Language:' 90 91 ParentColor = False … … 92 93 object ComboBoxLanguage: TComboBox 93 94 Left = 178 94 Height = 4095 Height = 28 95 96 Top = 24 96 97 Width = 196 97 ItemHeight = 098 ItemHeight = 20 98 99 Style = csDropDownList 99 100 TabOrder = 2 101 end 102 object CheckBoxReopenLastFile: TCheckBox 103 Left = 20 104 Height = 24 105 Top = 152 106 Width = 198 107 Caption = 'Reopen last game on start' 108 TabOrder = 3 100 109 end 101 110 end -
trunk/Forms/UFormSettings.pas
r145 r195 16 16 ButtonOk: TButton; 17 17 ButtonCancel: TButton; 18 CheckBoxReopenLastFile: TCheckBox; 18 19 CheckBoxAutoSaveTurn: TCheckBox; 19 20 CheckBox2: TCheckBox; … … 85 86 SpinEditY.Value := Core.ScaleDPI1.DPI.Y; 86 87 CheckBoxAutoSaveTurn.Checked := Core.AutoSaveEnabled; 88 CheckBoxReopenLastFile.Checked := Core.ReopenLastFile; 87 89 end; 88 90 … … 96 98 Core.ScaleDPI1.DPI := Point(SpinEditX.Value, SpinEditY.Value); 97 99 Core.AutoSaveEnabled := CheckBoxAutoSaveTurn.Checked; 100 Core.ReopenLastFile := CheckBoxReopenLastFile.Checked; 98 101 end; 99 102 -
trunk/Languages/xtactics.cs.po
r194 r195 591 591 msgid "Developer mode" 592 592 msgstr "Vývojářský režim" 593 594 #: tformsettings.checkboxreopenlastfile.caption 595 msgid "Reopen last game on start" 596 msgstr "Znovuotevřít poslední hru při startu" 593 597 594 598 #: tformsettings.label1.caption -
trunk/Languages/xtactics.po
r194 r195 575 575 #: tformsettings.checkboxdevelmode.caption 576 576 msgid "Developer mode" 577 msgstr "" 578 579 #: tformsettings.checkboxreopenlastfile.caption 580 msgid "Reopen last game on start" 577 581 msgstr "" 578 582 -
trunk/Packages/CoolTranslator/UCoolTranslator.pas
r143 r195 295 295 Result := FPOFilesFolder; 296 296 if Copy(Result, 1, 1) <> DirectorySeparator then 297 Result := ExtractFileDir( UTF8Encode(Application.ExeName)) +297 Result := ExtractFileDir(Application.ExeName) + 298 298 DirectorySeparator + Result; 299 299 end; -
trunk/UCore.pas
r193 r195 63 63 StoredDimension: TControlDimension; 64 64 RegistryContext: TRegistryContext; 65 GameLoaded: Boolean; 65 66 procedure LoadRecentExecute(Sender: TObject); 66 67 procedure ProcessComputerTurns; … … 87 88 AnimationSpeed: Integer; 88 89 AutoSaveEnabled: Boolean; 90 ReopenLastFile: Boolean; 89 91 FormClients: TFPGObjectList<TFormClient>; 90 92 Clients: TClients; … … 163 165 AnimationSpeed := XMLConfig1.GetValue('AnimationSpeed', 50); 164 166 AutoSaveEnabled := XMLConfig1.GetValue('AutoSave', True); 167 ReopenLastFile := XMLConfig1.GetValue('ReopenLastFile', True); 165 168 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(String(XMLConfig1.GetValue('Language', ''))); 166 169 ScaleDPI1.DPI := Point(XMLConfig1.GetValue('DPIX', 96), XMLConfig1.GetValue('DPIY', 96)); … … 175 178 XMLConfig1.SetValue('AnimationSpeed', AnimationSpeed); 176 179 XMLConfig1.SetValue('AutoSave', AutoSaveEnabled); 180 XMLConfig1.SetValue('ReopenLastFile', ReopenLastFile); 177 181 XMLConfig1.SetValue('DPIX', ScaleDPI1.DPI.X); 178 182 XMLConfig1.SetValue('DPIY', ScaleDPI1.DPI.Y); … … 186 190 // Command line parameter handling 187 191 if (ParamCount > 0) then begin 188 FileName := UTF8Encode(ParamStr(1));192 FileName := ParamStr(1); 189 193 if FileExists(FileName) then LoadGame(FileName); 190 194 end; … … 294 298 FormNew.Save(Server); 295 299 StartNewGame; 300 GameLoaded := False; 296 301 end; 297 302 finally … … 419 424 NewClient: TClient; 420 425 begin 426 GameLoaded := True; 427 421 428 Game.LoadFromFile(FileName); 422 429 Server.InitClients; … … 541 548 542 549 CommandLineParams; 550 if not GameLoaded and ReopenLastFile and (LastOpenedList1.Items.Count > 0) then 551 LoadGame(LastOpenedList1.Items[0]); 543 552 ScaleDPI; 544 553
Note:
See TracChangeset
for help on using the changeset viewer.