Changeset 44 for trunk/Forms


Ignore:
Timestamp:
Apr 19, 2019, 12:02:27 PM (6 years ago)
Author:
chronos
Message:
  • Added: About dialog.
Location:
trunk/Forms
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.lfm

    r38 r44  
    11object MainForm: TMainForm
    22  Left = 486
    3   Height = 515
     3  Height = 618
    44  Top = 258
    5   Width = 642
     5  Width = 770
    66  Caption = 'Tunneler'
    7   ClientHeight = 490
    8   ClientWidth = 642
    9   DesignTimePPI = 120
     7  ClientHeight = 584
     8  ClientWidth = 770
     9  DesignTimePPI = 144
    1010  Menu = MainMenu1
    1111  OnClose = FormClose
     
    2020    Left = 0
    2121    Height = 28
    22     Top = 462
    23     Width = 642
     22    Top = 556
     23    Width = 770
    2424    Panels = <   
    2525      item
    26         Width = 62
     26        Width = 74
    2727      end   
    2828      item
    29         Width = 62
     29        Width = 74
    3030      end   
    3131      item
    32         Width = 62
     32        Width = 74
    3333      end   
    3434      item
    35         Width = 62
     35        Width = 74
    3636      end   
    3737      item
    38         Width = 62
     38        Width = 74
    3939      end   
    4040      item
    41         Width = 62
     41        Width = 74
    4242      end   
    4343      item
    44         Width = 62
     44        Width = 74
    4545      end>
    4646    ParentFont = False
     
    4949  object Image1: TImage
    5050    Left = 0
    51     Height = 462
     51    Height = 556
    5252    Top = 0
    53     Width = 642
     53    Width = 770
    5454    Align = alClient
    5555    OnMouseLeave = Image1MouseLeave
     
    5959    Interval = 50
    6060    OnTimer = TimerDrawTimer
    61     left = 124
    62     top = 63
     61    left = 149
     62    top = 76
    6363  end
    6464  object MainMenu1: TMainMenu
    65     left = 230
    66     top = 20
     65    left = 276
     66    top = 24
    6767    object MenuItem1: TMenuItem
    6868      Caption = 'Game'
     
    9393    Interval = 20
    9494    OnTimer = TimerEngineTickTimer
    95     left = 120
    96     top = 130
     95    left = 144
     96    top = 156
    9797  end
    9898  object ActionList1: TActionList
    99     left = 360
    100     top = 40
     99    left = 432
     100    top = 48
    101101    object AFullScreen: TAction
    102102      Caption = 'Fullscreen mode'
     
    121121    object AAbout: TAction
    122122      Caption = 'About'
     123      OnExecute = AAboutExecute
    123124    end
    124125    object AShowRawImageDesc: TAction
     
    127128    end
    128129  end
    129   object CoolTranslator1: TCoolTranslator
    130     POFilesFolder = 'Languages'
    131     left = 360
    132     top = 130
    133   end
    134   object ApplicationInfo1: TApplicationInfo
    135     Identification = 1
    136     VersionMajor = 1
    137     VersionMinor = 0
    138     VersionBugFix = 0
    139     VersionSuffix = 'alfa'
    140     CompanyName = 'Chronosoft'
    141     HomePage = 'https://app.zdechov.net/Tunneler/'
    142     AuthorsName = 'Chronos'
    143     EmailContact = 'robie@centrum.cz'
    144     AppName = 'Tunneler'
    145     ReleaseDate = 43573
    146     RegistryKey = '\Software\Chronosoft\Tunneler'
    147     RegistryRoot = rrKeyCurrentUser
    148     License = 'CC0'
    149     left = 124
    150     top = 220
    151   end
    152130  object XMLConfig1: TXMLConfig
    153131    StartEmpty = False
    154132    RootName = 'CONFIG'
    155133    ReadOnly = False
    156     left = 124
    157     top = 300
     134    left = 149
     135    top = 360
    158136  end
    159137end
  • 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);
  • trunk/Forms/UNewGameForm.pas

    r43 r44  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, UCore;
     9  ComCtrls, UEngine;
    1010
    1111type
     
    8181
    8282uses
    83   UMainForm;
     83  UCore;
    8484
    8585{ TNewGameForm }
     
    275275procedure TNewGameForm.FormCreate(Sender: TObject);
    276276begin
    277   MainForm.CoolTranslator1.TranslateComponentRecursive(Self);
     277  Core.CoolTranslator1.TranslateComponentRecursive(Self);
    278278  Players := TPlayers.Create;
    279279end;
Note: See TracChangeset for help on using the changeset viewer.