Debian Codegraph @

tools/castle-editor/code/formabout.pas

raw
1 unit FormAbout;
2
3 {$mode objfpc}{$H+}
4
5 interface
6
7 uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
9 StdCtrls, Buttons;
10
11 type
12 TAboutForm = class(TForm)
13 BitBtn1: TBitBtn;
14 ImageLogo: TImage;
15 LabelWebsite: TLabel;
16 LabelName: TLabel;
17 LabelVersion: TLabel;
18 LabelCopyright: TLabel;
19 LabelWebsite1: TLabel;
20 procedure BitBtn1Click(Sender: TObject);
21 procedure FormCreate(Sender: TObject);
22 procedure LabelWebsite1Click(Sender: TObject);
23 procedure LabelWebsiteClick(Sender: TObject);
24 private
25
26 public
27
28 end;
29
30 var
31 AboutForm: TAboutForm;
32
33 implementation
34
35 uses CastleOpenDocument, CastleUtils;
36
37 {$R *.lfm}
38
39 procedure TAboutForm.LabelWebsiteClick(Sender: TObject);
40 begin
41 OpenUrl('https://castle-engine.io/');
42 end;
43
44 procedure TAboutForm.LabelWebsite1Click(Sender: TObject);
45 begin
46 OpenUrl('https://patreon.com/castleengine/');
47 end;
48
49 procedure TAboutForm.BitBtn1Click(Sender: TObject);
50 begin
51 Close;
52 end;
53
54 procedure TAboutForm.FormCreate(Sender: TObject);
55 var
56 VersionMultiline: String;
57 begin
58 { When a snapshot is packed by pack_release.sh,
59 CastleEngineVersion is long, and contains a commit information.
60 Display it nicer. }
61 VersionMultiline := StringReplace(CastleEngineVersion,
62 ' (commit', NL + '(commit', [rfReplaceAll, rfIgnoreCase]);
63 LabelVersion.Caption := 'Version: ' + VersionMultiline;
64 end;
65
66 end.
67