/
CDAboutWindow.uc
206 lines (173 loc) · 6.97 KB
/
CDAboutWindow.uc
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/*
* -------------------
* | CDAboutWindow.uc
* -------------------
* This file is part of CDAboutWindow for UT99.
*
* ChatDiamond is free software: you can redistribute and/or modify
* it under the terms of the Open Unreal Mod License version 1.1.
*
* ChatDiamond is distributed in the hope and belief that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the Open Unreal Mod License
* along with ChatDiamond. If not, see
* <https://beyondunrealwiki.github.io/pages/openunrealmodlicense.html>.
*
* Timeline:
* Before November, 2022: ProAsm and No0ne developed UTChat
* (https://ut99.org/viewtopic.php?f=7&t=14356)
* November, 2022: Transitioning from UTChat to ChatDiamond
* (https://ut99.org/viewtopic.php?f=7&t=14356&start=30#p139510)
* December, 2022: Native experiments
* April, 2023: Native - scripting hybrid progress
*/
//==============================================================================
// CDAboutWindow
//
//- For the display of involved parties
//==============================================================================
class CDAboutWindow expands UWindowPageWindow;
var color WhiteColor, GrayColor;
var color ChatDiamondTitleColor, CreditsCategoryColor;
var float PrevWinWidth, PrevWinHeight;
var string DetailMode;
var CDUWindowCreditsControl CDCreditsControl;
function Created()
{
local int CategoryPadding, AfterCategoryTitlePadding;
local int CategoryItemPadding;
Super.Created();
CategoryPadding = 40;
AfterCategoryTitlePadding = 20;
CategoryItemPadding = 10;
CDCreditsControl = CDUWindowCreditsControl(CreateWindow(class'CDUWindowCreditsControl', 0, 0, WinWidth, WinHeight));
CDCreditsControl.Register(Self);
CDCreditsControl.Initiate();
CDCreditsControl.AddLineText("Chat Diamond", 3, ChatDiamondTitleColor, true);
CDCreditsControl.AddPadding(AfterCategoryTitlePadding);
CDCreditsControl.AddLineText("Version: "$ class'CDUTConsole'.default.Version);
CDCreditsControl.AddPadding(CategoryPadding);
CDCreditsControl.AddLineText("Coder:",, CreditsCategoryColor);
CDCreditsControl.AddPadding(AfterCategoryTitlePadding);
CDCreditsControl.AddLineText("The_Cowboy", 1);
CDCreditsControl.AddPadding(CategoryPadding);
CDCreditsControl.AddLineText("Special Thanks To:",, CreditsCategoryColor);
CDCreditsControl.AddPadding(AfterCategoryTitlePadding);
CDCreditsControl.AddLineText("No0ne (for nice suggestions)", 1);
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("ProAsm", 1);
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("Daan 'Defrost' Scheerens from Zeropoint Productions", 1);
CDCreditsControl.AddLineUrl("https://github.com/dscheerens/nexgen",, "GitHub");
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("Bruce Bickar aka BDB", 1);
CDCreditsControl.AddLineUrl("https://www.utassault.net/leagueas/",, "LeagueAS");
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("Mongo and DrSin", 1);
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("[os]sphx", 1);
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("Dean Harmon (for WOT Greal)", 1);
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("Anthrax and UT99 patch team", 1);
CDCreditsControl.AddLineText("Anthrax again for UTDemo Manager", 1);
CDCreditsControl.AddPadding(CategoryItemPadding);
CDCreditsControl.AddLineText("[]KAOS[]Casey for", 1);
CDCreditsControl.AddLineUrl("https://www.oldunreal.com/phpBB3/viewtopic.php?f=37&t=3938",, "Native-Mod Tutorial");
CDCreditsControl.AddPadding(CategoryPadding);
CDCreditsControl.AddLineUrl("https://eatsleeput.com/d/192-chatdiamond", 2 ,"Forum");
CDCreditsControl.AddLineText("Please visit the forum for suggestions and feedbacks");
// Setting initial conditions for each scrolling context
// If scroll's height is greater than display area, then scroll. Else just stay.
if(CDCreditsControl.HeightTotal + 20 <= CDCreditsControl.WinHeight)
{
CDCreditsControl.Offset = -(CDCreditsControl.WinHeight - CDCreditsControl.HeightTotal) / 2;
}
else
{
CDCreditsControl.Offset = -10;
}
SetAcceptsFocus();
PrevWinWidth = WinWidth;
PrevWinHeight = WinHeight;
}
function Notify (UWindowDialogControl C, byte E)
{
Super.Notify(C,E);
}
function Resized()
{
Super.Resized();
Resize();
}
function Resize()
{
local float DiffX, DiffY;
DiffX = WinWidth - PrevWinWidth;
DiffY = WinHeight - PrevWinHeight;
if (DiffX != 0 || DiffY != 0)
{
CDCreditsControl.SetSize(CDCreditsControl.WinWidth + DiffX, CDCreditsControl.WinHeight + DiffY);
CDcreditsControl.Resize();
}
PrevWinWidth = WinWidth;
PrevWinHeight = WinHeight;
}
function BeforePaint( Canvas C, float X, float Y )
{
Super.BeforePaint(C, X, Y);
Resize();
}
function Paint (Canvas C, float MouseX, float MouseY)
{
Super.Paint(C,MouseX,MouseY);
C.Style = GetPlayerOwner().ERenderStyle.STY_Normal;
}
function Close (optional bool bByParent)
{
Super.Close(bByParent);
}
defaultproperties
{
ChatDiamondTitleColor=(R=180,G=180,B=180)
CreditsCategoryColor=(R=200,G=40,B=100)
}
/*
*
* /\
* / /
* /\| |
* | | |/\
* | | / /
* | ` /
* `\ (___
* _.-> ,-.-.
* _.' | \ \
* / _____| 0 |0\
* | /` `^-.\.-'`-._
* | | `-._
* | : `.
* \ `._ `-.__ O.'
* _.--, \ `._ __.^--._O_..-'
* `---, `. `\ /` ` `
* `\ `, `\ |
* | : ; |
* / `. ___|__|___
* / `. ( )
* / `---.:____...---' `--------`.
* / ( `. __ `.
* | `---------' _ / \ \
* | .-. _._ (_) `--' \
* | ( ) / \ \
* \ `-' \ / ;-._
* \ `-' \ .' `.
* /`. `\ `\ _.-'`-. `.___
* | `-._ `\ `\.-' `-. ,--`
* \ `--.___ ___`\ \ ||^\\
* `._ | ``----'' `. `\ `' `
* `--; \ jgs `. `.
* //^||^\\ //^||^\\
* ' `' ` ' ' `
*/