mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
VCMI credits
This commit is contained in:
parent
f8541d0ae4
commit
42d2257f19
@ -30,6 +30,7 @@ CreditsScreen::CreditsScreen(Rect rect)
|
|||||||
std::string text((char *)textFile.first.get(), textFile.second);
|
std::string text((char *)textFile.first.get(), textFile.second);
|
||||||
size_t firstQuote = text.find('\"') + 1;
|
size_t firstQuote = text.find('\"') + 1;
|
||||||
text = text.substr(firstQuote, text.find('\"', firstQuote) - firstQuote);
|
text = text.substr(firstQuote, text.find('\"', firstQuote) - firstQuote);
|
||||||
|
text = "{- VCMI -}\r\n\r\n{Contributors:}\r\n" + boost::algorithm::join(contributors, "\r\n") + "\r\n\r\n{Website:}\r\nhttps://vcmi.eu\r\n\r\n\r\n\r\n\r\n{- Heroes of Might and Magic III -}\r\n\r\n" + text;
|
||||||
credits = std::make_shared<CMultiLineLabel>(Rect(pos.w - 350, 0, 350, 600), FONT_CREDITS, ETextAlignment::CENTER, Colors::WHITE, text);
|
credits = std::make_shared<CMultiLineLabel>(Rect(pos.w - 350, 0, 350, 600), FONT_CREDITS, ETextAlignment::CENTER, Colors::WHITE, text);
|
||||||
credits->scrollTextTo(-600); // move all text below the screen
|
credits->scrollTextTo(-600); // move all text below the screen
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@ class CreditsScreen : public CIntObject
|
|||||||
int positionCounter;
|
int positionCounter;
|
||||||
std::shared_ptr<CMultiLineLabel> credits;
|
std::shared_ptr<CMultiLineLabel> credits;
|
||||||
|
|
||||||
|
// update contributors with bash: curl -s "https://api.github.com/repos/vcmi/vcmi/contributors" | jq '.[].login' | tr '\n' '|' | sed 's/|/, /g' | sed 's/..$//'
|
||||||
|
std::vector<std::string> contributors = { "IvanSavenko", "alexvins", "mwu-tow", "Nordsoft91", "mateuszbaran", "ArseniyShestakov", "nullkiller", "dydzio0614", "kambala-decapitator", "rilian-la-te", "DjWarmonger", "Laserlicht", "beegee1", "henningkoehlernz", "SoundSSGood", "vmarkovtsev", "krs0", "Mixaill", "Fayth", "ShubusCorporation", "rwesterlund", "Macron1Robot", "Chocimier", "Zyx-2000", "bwrsandman", "stopiccot", "viciious", "karol57", "heroesiiifan", "Adriankhl" };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CreditsScreen(Rect rect);
|
CreditsScreen(Rect rect);
|
||||||
void show(Canvas & to) override;
|
void show(Canvas & to) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user