Changeset 416 for trunk/Start.pas
- Timestamp:
- Nov 17, 2021, 10:47:48 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r385 r416 7 7 GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Types, 8 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, 9 Menus, Registry, DrawDlg, fgl, Protocol, UMiniMap, UBrain ;9 Menus, Registry, DrawDlg, fgl, Protocol, UMiniMap, UBrain, UTranslator; 10 10 11 11 type … … 133 133 procedure LoadConfig; 134 134 procedure SaveConfig; 135 procedure LoadLanguages; 135 136 procedure LoadAiBrainsPictures; 136 137 procedure UpdateInterface; … … 138 139 public 139 140 EmptyPicture: TBitmap; 141 Translator: TTranslator; 140 142 procedure UpdateFormerGames; 141 143 procedure UpdateMaps; … … 149 151 150 152 uses 151 Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UKeyBindings; 153 Global, Directories, Direct, ScreenTools, Inp, Back, Settings, UKeyBindings, 154 ULanguages; 152 155 153 156 {$R *.lfm} … … 226 229 LoadConfig; 227 230 LoadAssets; 231 LoadLanguages; 228 232 229 233 ActionsOffered := [maConfig, maManual, maCredits, maWeb]; … … 325 329 begin 326 330 SaveConfig; 331 FreeAndNil(Translator); 327 332 FreeAndNil(FormerGames); 328 333 FreeAndNil(Maps); … … 454 459 455 460 KeyBindings.SaveToRegistry(HKEY_CURRENT_USER, AppRegistryKey + '\KeyBindings'); 461 end; 462 463 procedure TStartDlg.LoadLanguages; 464 var 465 I: Integer; 466 begin 467 Translator := TTranslator.Create(nil); 468 with Translator, Languages do begin 469 AddNew('zh-Hant', 'Traditional Chinese'); 470 AddNew('zh-Hans', 'Simplified Chinese'); 471 SearchByCode('').Available := True; 472 473 for I := 1 to Languages.Count - 1 do 474 with Languages[I] do begin 475 Available := DirectoryExists(HomeDir + 'Localization' + DirectorySeparator + Code) or (Code = 'en'); 476 end; 477 end; 456 478 end; 457 479
Note:
See TracChangeset
for help on using the changeset viewer.