-
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathaboutunit.pas
More file actions
executable file
·155 lines (118 loc) · 3.58 KB
/
Copy pathaboutunit.pas
File metadata and controls
executable file
·155 lines (118 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
unit aboutunit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,ExtCtrls, LCLProc, LCLIntf, urlutils, themeunit, constants;
type
{ TaboutForm }
TaboutForm = class(TForm)
donateImage: TImage;
meImage: TImage;
creditsLabel: TLabel;
titleLabel: TLabel;
meLabel: TLabel;
descLabel: TLabel;
gplMemo: TMemo;
twitterlink: TImage;
linkedinlink: TImage;
aboutPageControl: TPageControl;
aboutTabSheet: TTabSheet;
licenseTabSheet: TTabSheet;
procedure FormCreate(Sender: TObject);
procedure donateImageClick(Sender: TObject);
procedure pascubelinkClick(Sender: TObject);
procedure Label1Click(Sender: TObject);
procedure linkedinlinkClick(Sender: TObject);
procedure mangolink1Click(Sender: TObject);
procedure mangolinkClick(Sender: TObject);
procedure schoorselinkLabelClick(Sender: TObject);
procedure twitterlinkClick(Sender: TObject);
private
public
end;
var
// ============================================================================
// FORM INSTANCE
// ============================================================================
aboutForm: TaboutForm; // About dialog form
implementation
{$R *.lfm}
{ TaboutForm }
procedure TaboutForm.mangolinkClick(Sender: TObject);
begin
OpenURLInBrowser(URL_MANGOHUD_REPO);
end;
procedure TaboutForm.schoorselinkLabelClick(Sender: TObject);
begin
OpenURLInBrowser(URL_VKBASALT_REPO);
end;
procedure TaboutForm.twitterlinkClick(Sender: TObject);
begin
OpenURLInBrowser(URL_TWITTER);
end;
procedure TaboutForm.linkedinlinkClick(Sender: TObject);
begin
OpenURLInBrowser(URL_LINKEDIN);
end;
procedure TaboutForm.mangolink1Click(Sender: TObject);
begin
end;
procedure TaboutForm.Label1Click(Sender: TObject);
begin
OpenURLInBrowser(URL_REPLAYSORCERY_REPO);
end;
procedure TaboutForm.FormCreate(Sender: TObject);
const
NewDarkBg = $002E1E1A;
var
i: Integer;
begin
//Set initial TAB
aboutPageControl.ActivePage:=aboutTabsheet;
//Centralize window
CenterFormOnScreen(Self);
// Update description and credits captions dynamically at runtime
descLabel.Caption := 'Open-source tool providing a unified interface to configure different gaming tools';
creditsLabel.Caption :=
#10'Credits:'#10#10 +
'FlightlessMango – MangoHud'#10 +
'DadSchoorse – vkBasalt'#10 +
'reakjra – vkSumi'#10 +
'OptiScaler ecosystem: OptiScaler, fakenvapi, Decky-Framegen, fgmod, DLSS-Enabler'#10#10 +
'Project links:'#10 +
'github.com/benjamimgois/goverlay'#10 +
'github.com/benjamimgois/pascube';
ApplyTheme(Self, CurrentTheme);
if CurrentTheme = tmDark then
begin
Self.Color := NewDarkBg;
aboutPageControl.Color := NewDarkBg;
aboutTabSheet.Color := NewDarkBg;
licenseTabSheet.Color := NewDarkBg;
titleLabel.Font.Color := clWhite;
titleLabel.Transparent := True;
meLabel.Font.Color := clWhite;
meLabel.Transparent := True;
descLabel.Font.Color := clWhite;
descLabel.Transparent := True;
creditsLabel.Font.Color := clWhite;
creditsLabel.Transparent := True;
gplMemo.Color := NewDarkBg;
gplMemo.Font.Color := clWhite;
end;
end;
procedure TaboutForm.donateImageClick(Sender: TObject);
begin
try
if not OpenURL(URL_KOFI) then
ShowMessage('Unable to open the link in the default web browser.');
except
on E: Exception do
ShowMessage('Error opening the link: ' + E.Message);
end;
end;
procedure TaboutForm.pascubelinkClick(Sender: TObject);
begin
OpenURLInBrowser(URL_GOVERLAY_REPO);
end;
end.