Changeset 73 for trunk/Forms


Ignore:
Timestamp:
Mar 26, 2024, 6:13:44 PM (8 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
Location:
trunk/Forms
Files:
15 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormDebug.pas

    r72 r73  
    1 unit UFormDebug;
     1unit FormDebug;
    22
    33interface
     
    1010  end;
    1111
    12 var
    13   FormDebug: TFormDebug;
    1412
    1513implementation
  • trunk/Forms/FormGameResult.pas

    r72 r73  
    1 unit UFormGameResult;
     1unit FormGameResult;
    22
    33interface
     
    1010  end;
    1111
    12 var
    13   FormGameResult: TFormGameResult;
    14 
    1512
    1613implementation
  • trunk/Forms/FormMain.pas

    r72 r73  
    1 unit UFormMain;
     1unit FormMain;
    22
    33interface
     
    55uses
    66  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,
    88  DateUtils, GraphType, UPersistentForm, UApplicationInfo, UTranslator,
    9   URegistry, UAboutDialog;
     9  URegistry, UAboutDialog, FormNewGame, FormMap;
    1010
    1111type
     
    6161    PersistentForm: TPersistentForm;
    6262    Engine: TEngine;
     63    FormNewGame: TFormNewGame;
     64    FormMap: TFormMap;
    6365    procedure EraseBackground(DC: HDC); override;
    6466  end;
     
    7375
    7476uses
    75   UCore, UFormMap, UFormNewGame;
     77  Core;
    7678
    7779resourcestring
     
    115117  with TRegistryEx.Create do
    116118  try
    117     CurrentContext := Core.ApplicationInfo.GetRegistryContext;
     119    CurrentContext := Core.Core.ApplicationInfo.GetRegistryContext;
    118120
    119121    if ValueExists('LanguageCode') then begin
    120122      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('');
    123125    Engine.LoadFromRegistry(CurrentContext);
    124126  finally
     
    131133  with TRegistryEx.Create do
    132134  try
    133     CurrentContext := Core.ApplicationInfo.GetRegistryContext;
    134 
    135     if Assigned(Core.Translator1.Language) and (Core.Translator1.Language.Code <> '') then
    136       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)
    137139      else DeleteValue('LanguageCode');
    138140    Engine.SaveToRegistry(CurrentContext);
     
    167169  {$IFDEF UNIX}
    168170  // If installed in UNIX system then use installation directory for po files
    169   if not DirectoryExists(Core.Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then
    170     Core.Translator1.POFilesFolder := UnixLanguagesDir;
     171  if not DirectoryExists(Core.Core.Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then
     172    Core.Core.Translator1.POFilesFolder := UnixLanguagesDir;
    171173  {$ENDIF}
    172174
     
    175177
    176178  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);
    179181
    180182  Application.OnDeactivate := FormDeactivate;
     
    265267procedure TFormMain.FormShow(Sender: TObject);
    266268begin
    267   PersistentForm.RegistryContext := Core.ApplicationInfo.GetRegistryContext;
     269  PersistentForm.RegistryContext := Core.Core.ApplicationInfo.GetRegistryContext;
    268270  PersistentForm.Load(Self, False, True);
    269271  FullScreenEnabled := PersistentForm.FormFullScreen;
  • trunk/Forms/FormMap.pas

    r72 r73  
    1 unit UFormMap;
     1unit FormMap;
    22
    33interface
     
    1616  end;
    1717
    18 var
    19   FormMap: TFormMap;
    20 
    2118
    2219implementation
     
    2522
    2623uses
    27   UFormMain;
     24  FormMain;
    2825
    2926{ TFormMap }
     
    3229begin
    3330  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);
    3532end;
    3633
  • trunk/Forms/FormNewGame.pas

    r72 r73  
    1 unit UFormNewGame;
     1unit FormNewGame;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   ComCtrls, UEngine;
     7  ComCtrls, Engine;
    88
    99type
     
    7272  end;
    7373
    74 var
    75   FormNewGame: TFormNewGame;
    76 
    7774
    7875implementation
     
    8178
    8279uses
    83   UCore;
     80  Core;
    8481
    8582{ TFormNewGame }
     
    286283procedure TFormNewGame.FormCreate(Sender: TObject);
    287284begin
    288   Core.Translator1.TranslateComponentRecursive(Self);
     285  Core.Core.Translator1.TranslateComponentRecursive(Self);
    289286  Players := TPlayers.Create;
    290287end;
Note: See TracChangeset for help on using the changeset viewer.