mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	VCMI credits
This commit is contained in:
		| @@ -30,6 +30,7 @@ CreditsScreen::CreditsScreen(Rect rect) | ||||
| 	std::string text((char *)textFile.first.get(), textFile.second); | ||||
| 	size_t firstQuote = text.find('\"') + 1; | ||||
| 	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->scrollTextTo(-600); // move all text below the screen | ||||
| } | ||||
|   | ||||
| @@ -18,6 +18,9 @@ class CreditsScreen : public CIntObject | ||||
| 	int positionCounter; | ||||
| 	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: | ||||
| 	CreditsScreen(Rect rect); | ||||
| 	void show(Canvas & to) override; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user