21 #include "C4Version.h"
38 static struct DeveloperList :
public PersonList
40 std::vector<Entry> developers;
42 DeveloperList(std::initializer_list<Entry> l) : developers(l) { }
46 for (
auto& p : developers)
54 std::stringstream out;
55 for (
auto& p : developers)
57 out << p.name <<
" (" << p.nick <<
")\n";
65 {
"Sven Eberhardt",
"Sven2"},
66 {
"Günther Brammer",
"Günther"},
67 {
"Nicolas Hake",
"Isilkor"},
68 {
"Armin Burgmeier",
"Clonk-Karl"},
69 {
"Lukas Werling",
"Luchs"},
70 {
"Martin Plicht",
"Mortimer"},
71 {
"Julius Michaelis",
"JCaesar"},
72 {
"Peter Wortmann",
"PeterW"},
76 {
"Maikel de Vries",
"Maikel"},
77 {
"David Dormagen",
"Zapper"},
78 {
"Mark Haßelbusch",
"Marky"},
79 {
"Felix Wagner",
"Clonkonaut"},
80 {
"Bernhard Bonigl",
"Boni"},
84 {
"Tobias Zwick",
"Newton"},
88 {
"Charles Spurrill",
"Ringwaul"},
89 {
"Richard Gerum",
"Randrian"},
90 {
"Timo Stabbert",
"Mimmo"},
91 {
"Matthias Rottländer",
"Matthi"},
95 {
"David Oerther",
"ala"},
96 {
"Martin Strohmeier",
"K-Pone"},
99 static struct ContributorList :
public PersonList
101 static const std::vector<Entry> contributorsThisRelease, contributors, packageMaintainers;
103 std::string ConcatNames(
const std::vector<Entry>& names,
bool with_color)
105 const char *opening_tag = with_color ?
"<c f7f76f>" :
"";
106 const char *closing_tag = with_color ?
"</c>" :
"";
107 std::stringstream result;
109 for (
auto& p : names)
111 if (!first) result <<
", ";
114 result << p.name <<
" " << opening_tag <<
"(" << p.nick <<
")" << closing_tag;
121 template<
typename Func>
122 std::string WriteLines(Func f,
bool with_color)
124 const char *opening_tag = with_color ?
"<c ff0000>" :
"";
125 const char *closing_tag = with_color ?
"</c>" :
"";
126 std::stringstream
text;
128 text << opening_tag <<
"Contributors for OpenClonk 8.0:" << closing_tag <<
" ";
129 text << ConcatNames(contributorsThisRelease, with_color);
132 text << opening_tag <<
"Previous contributors:" << closing_tag <<
" ";
133 text << ConcatNames(contributors, with_color);
136 text << opening_tag <<
"Also thanks to our Linux package maintainers" << closing_tag <<
" ";
137 text << ConcatNames(packageMaintainers, with_color);
138 text <<
", and more";
141 text <<
"Finally, a big thanks to Matthes Bender and all those who contributed to previous Clonk titles for the passion they put into the game and for agreeing to make Clonk open source.";
149 WriteLines([&](std::stringstream&
text)
158 return WriteLines([&](std::stringstream&
text)
167 const std::vector<ContributorList::Entry> ContributorList::contributorsThisRelease = {
168 {
"George Tokmaji",
"Fulgen"},
169 {
"Martin Adam",
"Win"},
170 {
"Merten Ehmig",
"pluto"},
171 {
"Florian Graier",
"Nachtfalter"},
172 {
"Philip Holzmann",
"Foaly"},
173 {
"Dominik Bayerl",
"Kanibal"},
174 {
"Linus Heckemann",
"sphalerite"},
176 {
"Armin Schäfer",
nullptr},
177 {
"Tushar Maheshwari",
nullptr},
180 {
"Philip Kern",
"pkern"},
181 {
"Arne Schauf",
"NativeException"},
182 {
"Matthias Mailänder",
nullptr},
183 {
"marsmoon",
nullptr},
187 const std::vector<ContributorList::Entry> ContributorList::contributors = {
188 {
"Tim Blume",
nullptr},
189 {
"Sven-Hendrik Haase",
nullptr},
190 {
"Carl-Philip Hänsch",
"Carli"},
191 {
"Jan Heberer",
nullptr},
192 {
"Benjamin Herr",
"Loriel"},
193 {
"Lauri Niskanen",
"Ape"},
194 {
"Johannes Nixdorf",
"mixi"},
195 {
"Misty de Meo",
nullptr},
196 {
"Fabian Pietsch",
nullptr},
197 {
"Manuel Rieke",
"MrBeast"},
198 {
"Felix Riese",
"Fungiform"},
199 {
"Sebastian Rühl",
nullptr},
200 {
"Oliver Schneider",
"ker"},
201 {
"Lorenz Schwittmann",
nullptr},
202 {
"Alexander Semeniuk",
"AlteredARMOR"},
203 {
"Daniel Theuke",
"ST-DDT"},
204 {
"Andriel",
nullptr},
205 {
"Apfelclonk",
nullptr},
206 {
"Asmageddon",
nullptr},
207 {
"Checkmaty",
nullptr},
208 {
"Clonkine",
nullptr},
209 {
"dylanstrategie",
nullptr},
211 {
"grgecko",
nullptr},
212 {
"Gurkenglas",
nullptr},
213 {
"hasufell",
nullptr},
214 {
"Koronis",
nullptr},
215 {
"mizipzor",
nullptr},
217 {
"Russell",
nullptr},
219 {
"TomyLobo",
nullptr},
223 const std::vector<ContributorList::Entry> ContributorList::packageMaintainers = {
224 {
"Benedict Etzel",
"B_E"},
225 {
"Linus Heckemann",
"sphalerite"},
226 {
"Philip Kern",
"pkern"},
227 {
"Matthias Mailänder",
nullptr},
228 {
"Julian Ospald",
"hasufell"},
229 {
"Kevin Zheng",
nullptr},
252 #ifdef WITH_AUTOMATIC_UPDATE
279 void C4StartupAboutDlg::DrawPersonList(
int title,
PersonList& persons,
C4Rect& rect)
283 int height = 2*rUseFont.
GetFontHeight(), width = std::min(image.GetWidthByHeight(height), rect.
Wdt);
286 picture->SetFacet(image);
287 rect.
y += height; rect.
Hgt -= height;
288 auto textbox =
new C4GUI::TextWindow(rect, 0, 0, 0, 100, 4096,
"",
true,
nullptr, 0,
true);
291 persons.
WriteTo(textbox, rUseFont);
295 bool C4StartupAboutDlg::SaveCredits()
297 std::ofstream credits(
"Credits.txt", std::ios::out | std::ios::trunc);
304 credits <<
"<Engine and Tools>\n";
305 credits << engineAndTools.ToString();
307 credits <<
"\n<Scripting and Content>\n";
308 credits << scriptingAndContent.ToString();
310 credits <<
"\n<Art and Content>\n";
311 credits << artAndContent.ToString();
313 credits <<
"\n<Music and Sound>\n";
314 credits << musicAndSound.ToString();
316 credits <<
"\n<Administration>\n";
317 credits << administration.ToString();
319 credits <<
"\n<Special Thanks to Contributors>\n";
320 credits << contributors.ToString();
335 #ifdef WITH_AUTOMATIC_UPDATE
338 C4UpdateDlg::CheckForUpdates(
GetScreen());
C4GraphicsResource GraphicsResource
#define C4GUI_MessageFontClr
const char * LoadResStr(const char *id)
@ C4StartupAboutEngineAndTools
@ C4StartupAboutArtAndContent
@ C4StartupAboutContributors
@ C4StartupAboutAdministration
@ C4StartupAboutScriptingAndContent
@ C4StartupAboutMusicAndSound
StdStrBuf FormatString(const char *szFmt,...)
C4Facet GetPhase(int iPhaseX=0, int iPhaseY=0)
bool GetFromLeft(int32_t iWdt, int32_t iHgt, C4Rect &rcOut)
int32_t GetHeight() const
int32_t GetInnerWidth() const
bool GetFromTop(int32_t iHgt, int32_t iWdt, C4Rect &rcOut)
C4Rect & GetGridCell(int32_t iSectX, int32_t iSectXMax, int32_t iSectY, int32_t iSectYMax, int32_t iSectSizeX=-1, int32_t iSectSizeY=-1, bool fCenterPos=false, int32_t iSectNumX=1, int32_t iSectNumY=1)
bool GetFromBottom(int32_t iHgt, int32_t iWdt, C4Rect &rcOut)
void AddElement(Element *pChild)
void UpdateSize() override
virtual Screen * GetScreen()
C4Rect GetContainedClientRect()
void SetToolTip(const char *szNewTooltip, bool is_immediate=false)
bool ShowMessageModal(const char *szMessage, const char *szCaption, DWORD dwButtons, Icons icoIcon, int32_t *piConfigDontShowAgainSetting=nullptr)
void SetDecoration(bool fDrawBG, bool fDrawFrame, ScrollBarFacets *pToGfx, bool fAutoScroll)
void AddTextLine(const char *szText, CStdFont *pFont, DWORD dwClr, bool fDoUpdate, bool fMakeReadableOnBlack, CStdFont *pCaptionFont=nullptr)
~C4StartupAboutDlg() override
void OnLegalBtn(C4GUI::Control *btn)
void OnBackBtn(C4GUI::Control *btn)
void DrawElement(C4TargetFacet &cgo) override
class C4StartupDlg * SwitchDialog(DialogID eToDlg, bool fFade=true, const char *szSubDialog=nullptr)
C4StartupGraphics Graphics
int GetLineHeight() const
int GetFontHeight() const
const char * getData() const
virtual std::string ToString()=0
virtual void WriteTo(C4GUI::TextWindow *textbox, CStdFont &font)=0