Changeset 73 for trunk/Forms
- Timestamp:
- Mar 26, 2024, 6:13:44 PM (8 months ago)
- Location:
- trunk/Forms
- Files:
-
- 15 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormDebug.pas
r72 r73 1 unit UFormDebug;1 unit FormDebug; 2 2 3 3 interface … … 10 10 end; 11 11 12 var13 FormDebug: TFormDebug;14 12 15 13 implementation -
trunk/Forms/FormGameResult.pas
r72 r73 1 unit UFormGameResult;1 unit FormGameResult; 2 2 3 3 interface … … 10 10 end; 11 11 12 var13 FormGameResult: TFormGameResult;14 15 12 16 13 implementation -
trunk/Forms/FormMain.pas
r72 r73 1 unit UFormMain;1 unit FormMain; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, LCLType, 7 Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, UEngine, UPlatform, Math,7 Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, Engine, Platform, Math, 8 8 DateUtils, GraphType, UPersistentForm, UApplicationInfo, UTranslator, 9 URegistry, UAboutDialog ;9 URegistry, UAboutDialog, FormNewGame, FormMap; 10 10 11 11 type … … 61 61 PersistentForm: TPersistentForm; 62 62 Engine: TEngine; 63 FormNewGame: TFormNewGame; 64 FormMap: TFormMap; 63 65 procedure EraseBackground(DC: HDC); override; 64 66 end; … … 73 75 74 76 uses 75 UCore, UFormMap, UFormNewGame;77 Core; 76 78 77 79 resourcestring … … 115 117 with TRegistryEx.Create do 116 118 try 117 CurrentContext := Core. ApplicationInfo.GetRegistryContext;119 CurrentContext := Core.Core.ApplicationInfo.GetRegistryContext; 118 120 119 121 if ValueExists('LanguageCode') then begin 120 122 LangCode := ReadStringWithDefault('LanguageCode', ''); 121 Core. Translator1.Language :=Core.Translator1.Languages.SearchByCode(LangCode);122 end else Core. Translator1.Language :=Core.Translator1.Languages.SearchByCode('');123 Core.Core.Translator1.Language := Core.Core.Translator1.Languages.SearchByCode(LangCode); 124 end else Core.Core.Translator1.Language := Core.Core.Translator1.Languages.SearchByCode(''); 123 125 Engine.LoadFromRegistry(CurrentContext); 124 126 finally … … 131 133 with TRegistryEx.Create do 132 134 try 133 CurrentContext := Core. ApplicationInfo.GetRegistryContext;134 135 if Assigned(Core. Translator1.Language) and (Core.Translator1.Language.Code <> '') then136 WriteString('LanguageCode', Core. Translator1.Language.Code)135 CurrentContext := Core.Core.ApplicationInfo.GetRegistryContext; 136 137 if Assigned(Core.Core.Translator1.Language) and (Core.Core.Translator1.Language.Code <> '') then 138 WriteString('LanguageCode', Core.Core.Translator1.Language.Code) 137 139 else DeleteValue('LanguageCode'); 138 140 Engine.SaveToRegistry(CurrentContext); … … 167 169 {$IFDEF UNIX} 168 170 // If installed in UNIX system then use installation directory for po files 169 if not DirectoryExists(Core. Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then170 Core. Translator1.POFilesFolder := UnixLanguagesDir;171 if not DirectoryExists(Core.Core.Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then 172 Core.Core.Translator1.POFilesFolder := UnixLanguagesDir; 171 173 {$ENDIF} 172 174 … … 175 177 176 178 PersistentForm := TPersistentForm.Create(nil); 177 PersistentForm.RegistryContext := TRegistryContext.Create(Core. ApplicationInfo.RegistryRoot,178 Core. ApplicationInfo.RegistryKey);179 PersistentForm.RegistryContext := TRegistryContext.Create(Core.Core.ApplicationInfo.RegistryRoot, 180 Core.Core.ApplicationInfo.RegistryKey); 179 181 180 182 Application.OnDeactivate := FormDeactivate; … … 265 267 procedure TFormMain.FormShow(Sender: TObject); 266 268 begin 267 PersistentForm.RegistryContext := Core. ApplicationInfo.GetRegistryContext;269 PersistentForm.RegistryContext := Core.Core.ApplicationInfo.GetRegistryContext; 268 270 PersistentForm.Load(Self, False, True); 269 271 FullScreenEnabled := PersistentForm.FormFullScreen; -
trunk/Forms/FormMap.pas
r72 r73 1 unit UFormMap;1 unit FormMap; 2 2 3 3 interface … … 16 16 end; 17 17 18 var19 FormMap: TFormMap;20 21 18 22 19 implementation … … 25 22 26 23 uses 27 UFormMain;24 FormMain; 28 25 29 26 { TFormMap } … … 32 29 begin 33 30 Image1.Picture.Bitmap.SetSize(Image1.Width, Image1.Height); 34 FormMain. Engine.World.DrawToBitmap(Image1.Picture.Bitmap);31 FormMain.FormMain.Engine.World.DrawToBitmap(Image1.Picture.Bitmap); 35 32 end; 36 33 -
trunk/Forms/FormNewGame.pas
r72 r73 1 unit UFormNewGame;1 unit FormNewGame; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 ComCtrls, UEngine;7 ComCtrls, Engine; 8 8 9 9 type … … 72 72 end; 73 73 74 var75 FormNewGame: TFormNewGame;76 77 74 78 75 implementation … … 81 78 82 79 uses 83 UCore;80 Core; 84 81 85 82 { TFormNewGame } … … 286 283 procedure TFormNewGame.FormCreate(Sender: TObject); 287 284 begin 288 Core. Translator1.TranslateComponentRecursive(Self);285 Core.Core.Translator1.TranslateComponentRecursive(Self); 289 286 Players := TPlayers.Create; 290 287 end;
Note:
See TracChangeset
for help on using the changeset viewer.