Ignore:
Timestamp:
Apr 19, 2019, 12:02:27 PM (5 years ago)
Author:
chronos
Message:
  • Added: About dialog.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.pas

    r43 r44  
    77uses
    88  XMLConf, Classes, SysUtils, FileUtil, Forms, Controls, Graphics,
    9   Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, UCore, UPlatform, Math,
     9  Dialogs, ExtCtrls, ComCtrls, Menus, ActnList, UEngine, UPlatform, Math,
    1010  DateUtils, GraphType, UPersistentForm, UApplicationInfo, UCoolTranslator,
    1111  LCLType, URegistry;
     
    1717  TMainForm = class(TForm)
    1818    AAbout: TAction;
    19     ApplicationInfo1: TApplicationInfo;
    2019    AShowRawImageDesc: TAction;
    2120    AShowMap: TAction;
     
    2423    AFullScreen: TAction;
    2524    ActionList1: TActionList;
    26     CoolTranslator1: TCoolTranslator;
    2725    Image1: TImage;
    2826    MainMenu1: TMainMenu;
     
    3937    TimerEngineTick: TTimer;
    4038    XMLConfig1: TXMLConfig;
     39    procedure AAboutExecute(Sender: TObject);
    4140    procedure AExitExecute(Sender: TObject);
    4241    procedure AFullScreenExecute(Sender: TObject);
     
    7776
    7877uses
    79   UMapForm, UNewGameForm;
     78  UCore, UMapForm, UNewGameForm, UFormAbout;
    8079
    8180resourcestring
     
    136135
    137136  PersistentForm := TPersistentForm.Create(nil);
    138   PersistentForm.RegistryContext := TRegistryContext.Create(ApplicationInfo1.RegistryRoot,
    139     ApplicationInfo1.RegistryKey);
     137  PersistentForm.RegistryContext := TRegistryContext.Create(Core.ApplicationInfo.RegistryRoot,
     138    Core.ApplicationInfo.RegistryKey);
    140139
    141140  Application.OnDeactivate := FormDeactivate;
     
    144143  Engine := TEngine.Create;
    145144  Engine.Bitmap := Image1.Picture.Bitmap;
    146   CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('cs');
     145  Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode('cs');
    147146  LoadConfig;
    148147  Engine.NewGame;
     
    220219end;
    221220
     221procedure TMainForm.AAboutExecute(Sender: TObject);
     222begin
     223  FormAbout := TFormAbout.Create(nil);
     224  FormAbout.ShowModal;
     225  FreeAndNil(FormAbout);
     226end;
     227
    222228procedure TMainForm.FormKeyDown(Sender: TObject; var Key: Word;
    223229  Shift: TShiftState);
Note: See TracChangeset for help on using the changeset viewer.