Changeset 115 for trunk/Forms


Ignore:
Timestamp:
Dec 10, 2016, 3:52:26 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: In Debug mode also check executed classes references.
  • Modified: Better About dialog.
  • Modified: About and Help dialogs are created in time when they are shown.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.lfm

    r107 r115  
    11object FormAbout: TFormAbout
    2   Left = 475
    3   Height = 150
    4   Top = 161
    5   Width = 313
    6   BorderStyle = bsDialog
     2  Left = 1014
     3  Height = 358
     4  Top = 442
     5  Width = 564
    76  Caption = 'About'
    8   ClientHeight = 150
    9   ClientWidth = 313
    10   Constraints.MinHeight = 150
    11   Constraints.MinWidth = 313
    12   Font.Height = -11
    13   Font.Name = 'MS Sans Serif'
     7  ClientHeight = 358
     8  ClientWidth = 564
     9  OnCreate = FormCreate
    1410  OnShow = FormShow
    15   Position = poMainFormCenter
    16   LCLVersion = '1.4.4.0'
     11  Position = poScreenCenter
     12  LCLVersion = '1.6.0.4'
     13  object LabelDescription: TLabel
     14    Left = 20
     15    Height = 72
     16    Top = 110
     17    Width = 524
     18    Align = alTop
     19    BorderSpacing.Around = 20
     20    Caption = 'Turn-based strategy game inspired by classic Risk board game. The game is highly configurable to allow to adjust battle field and game rules.'
     21    ParentColor = False
     22    WordWrap = True
     23  end
     24  object ButtonClose: TButton
     25    Left = 451
     26    Height = 25
     27    Top = 318
     28    Width = 93
     29    Anchors = [akRight, akBottom]
     30    Caption = 'Close'
     31    ModalResult = 1
     32    TabOrder = 0
     33  end
     34  object LabelContent: TLabel
     35    Left = 20
     36    Height = 24
     37    Top = 202
     38    Width = 524
     39    Align = alTop
     40    BorderSpacing.Around = 20
     41    Caption = '   '
     42    ParentColor = False
     43  end
     44  object ButtonHomePage: TButton
     45    Left = 16
     46    Height = 25
     47    Top = 318
     48    Width = 176
     49    Anchors = [akLeft, akBottom]
     50    Caption = 'Home page'
     51    OnClick = ButtonHomePageClick
     52    TabOrder = 1
     53  end
    1754  object Panel1: TPanel
    18     Left = 8
    19     Height = 97
    20     Top = 8
    21     Width = 299
    22     Anchors = [akTop, akLeft, akRight, akBottom]
    23     BevelInner = bvRaised
    24     BevelOuter = bvLowered
    25     ClientHeight = 97
    26     ClientWidth = 299
    27     TabOrder = 0
    28     object Memo1: TMemo
    29       Left = 8
    30       Height = 78
    31       Top = 8
    32       Width = 277
    33       Anchors = [akTop, akLeft, akRight, akBottom]
    34       BorderStyle = bsNone
    35       Color = clBtnFace
    36       ReadOnly = True
    37       TabOrder = 0
     55    Left = 0
     56    Height = 90
     57    Top = 0
     58    Width = 564
     59    Align = alTop
     60    BevelOuter = bvNone
     61    ClientHeight = 90
     62    ClientWidth = 564
     63    FullRepaint = False
     64    TabOrder = 2
     65    object LabelAppName: TLabel
     66      Left = 96
     67      Height = 55
     68      Top = 20
     69      Width = 144
     70      Align = alCustom
     71      BorderSpacing.Around = 20
     72      Caption = 'xTactics'
     73      Font.Height = -40
     74      ParentColor = False
     75      ParentFont = False
     76      WordWrap = True
     77    end
     78    object Image1: TImage
     79      Left = 16
     80      Height = 66
     81      Top = 20
     82      Width = 66
     83      Picture.Data = {
     84        1754506F727461626C654E6574776F726B47726170686963CF01000089504E47
     85        0D0A1A0A0000000D49484452000000400000004008030000009DB781EC000000
     86        0F504C54450000000000000000FFF9042CFFFFFFF07F75380000000174524E53
     87        0040E6D8660000016E49444154789CADD6590EC3200C04D01473FF33774BC0CB
     88        8C3169F98A22CF2B181A711CC9789C23AB29C46F120F377E8C6F1233D45F639B
     89        B0F16D22C6B7081C2F133C5E22F2F89258C78DE089529CCFE27A25E760E1760E
     90        474C5372A179E043E8C94B2A8C7C330BD16B974C681A98C4A15B2789D01C7011
     91        87EEBC70A145E04B704068BE0A08CB738009240F002CB03C029040F3108802CF
     92        63C00B499E00A9D02B4022F41A40055F47012284320E40215625001040510604
     93        01D50060D6B570A22E3903E64C5F4F58D0560066AF3E4F4830B3C1401B0F4090
     94        1CB8847172BCE0DA819AE8868091EE4241E839B014FA0A081F609E6727D1FFFF
     95        69BE007C5F6C02E0FBB1B50490A7C2721B417EB58D23197B301C000C42FDB2DF
     96        0535131577170C33737B0ECC5A665C016FC2AE5C9F44DB0D77575384EDFD9C81
     97        DD8F78D59B2FECB7F3EA817E2712E27FB868D6091AFFC3657B4D2CE339518A73
     98        A21CC7C4563C12DB714BDC8A236233EE891B714D64354F08C023531B730D1E00
     99        00000049454E44AE426082
     100      }
    38101    end
    39102  end
    40   object OKButton: TButton
    41     Left = 111
    42     Height = 25
    43     Top = 117
    44     Width = 75
    45     Anchors = [akLeft, akBottom]
    46     Caption = 'OK'
    47     Default = True
    48     ModalResult = 1
    49     OnClick = OKButtonClick
    50     TabOrder = 1
    51   end
    52103end
  • trunk/Forms/UFormAbout.lrt

    r107 r115  
    11TFORMABOUT.CAPTION=About
    2 TFORMABOUT.OKBUTTON.CAPTION=OK
     2TFORMABOUT.LABELDESCRIPTION.CAPTION=Turn-based strategy game inspired by classic Risk board game. The game is highly configurable to allow to adjust battle field and game rules.
     3TFORMABOUT.BUTTONCLOSE.CAPTION=Close
     4TFORMABOUT.LABELCONTENT.CAPTION=   
     5TFORMABOUT.BUTTONHOMEPAGE.CAPTION=Home page
     6TFORMABOUT.LABELAPPNAME.CAPTION=xTactics
  • trunk/Forms/UFormAbout.pas

    r47 r115  
    11unit UFormAbout;
    22
    3 {$MODE Delphi}
     3{$mode delphi}
    44
    55interface
    66
    77uses
    8   SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
    9   Buttons, ExtCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
     9  StdCtrls, ExtCtrls, UApplicationInfo, UCommon;
    1010
    1111type
     
    1414
    1515  TFormAbout = class(TForm)
     16    ButtonHomePage: TButton;
     17    ButtonClose: TButton;
     18    Image1: TImage;
     19    LabelAppName: TLabel;
     20    LabelDescription: TLabel;
     21    LabelContent: TLabel;
    1622    Panel1: TPanel;
    17     OKButton: TButton;
    18     Memo1: TMemo;
    19     procedure OKButtonClick(Sender: TObject);
     23    procedure ButtonHomePageClick(Sender: TObject);
     24    procedure FormCreate(Sender: TObject);
    2025    procedure FormShow(Sender: TObject);
    2126  private
    22     { Private declarations }
     27    { private declarations }
    2328  public
    24     { Public declarations }
     29    { public declarations }
    2530  end;
    2631
     
    3641
    3742resourcestring
    38   SApplicationName = 'Application name';
    3943  SVersion = 'Version';
    4044  SReleaseDate = 'Release date';
    41   SManufacturer = 'Company';
    42   SEmail = 'E-mail';
    43   SHomePage = 'Homepage';
     45  SLicense = 'License';
     46
     47{ TFormAbout }
    4448
    4549procedure TFormAbout.FormShow(Sender: TObject);
    4650begin
    47   with Memo1, Lines, Core.ApplicationInfo do begin
    48     BeginUpdate;
    49     Clear;
    50     Add(SApplicationName + ': ' + AppName);
    51     Add(SVersion + ': ' + Version);
    52     Add(SReleaseDate + ': ' + DateToStr(ReleaseDate));
    53     Add(SHomePage + ': ' + HomePage);
    54     Add(SManufacturer + ': ' + CompanyName);
    55     Add(SEmail + ': ' + EmailContact);
    56     EndUpdate;
     51  with Core do begin
     52    LabelAppName.Caption := ApplicationInfo.AppName;
     53    LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
     54      SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
     55      SLicense + ': ' + ApplicationInfo.License;
    5756  end;
    58   FocusControl(OKButton);
    5957end;
    6058
    61 procedure TFormAbout.OKButtonClick(Sender: TObject);
     59procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
    6260begin
    63   Close;
     61  OpenWebPage(Core.ApplicationInfo.HomePage);
     62end;
     63
     64procedure TFormAbout.FormCreate(Sender: TObject);
     65begin
     66  Core.CoolTranslator1.TranslateComponentRecursive(Self);
    6467end;
    6568
    6669end.
    67  
     70
Note: See TracChangeset for help on using the changeset viewer.