Sfoglia il codice sorgente

added custom icons for buttons made by Ivan

Laserlicht 1 anno fa
parent
commit
b885fd9d3b

BIN
Mods/vcmi/Data/spellResearch/accept.png


BIN
Mods/vcmi/Data/spellResearch/close.png


BIN
Mods/vcmi/Data/spellResearch/reroll.png


+ 5 - 3
client/windows/CCastleInterface.cpp

@@ -2063,20 +2063,22 @@ void CMageGuildScreen::Scroll::clickPressed(const Point & cursorPosition)
 
 		auto showSpellResearchDialog = [this, resComps, town, cost, newSpell](){
 			std::vector<std::pair<AnimationPath, CFunctionList<void()>>> pom;
-			pom.emplace_back(AnimationPath::builtin("ibuy30.DEF"), nullptr);
-			pom.emplace_back(AnimationPath::builtin("hsbtns4.DEF"), nullptr);
-			pom.emplace_back(AnimationPath::builtin("ICANCEL.DEF"), nullptr);
+			for(int i = 0; i < 3; i++)
+				pom.emplace_back(AnimationPath::builtin("settingsWindow/button80"), nullptr);
 
 			auto text = CGI->generaltexth->translate(LOCPLINT->cb->getResourceAmount().canAfford(cost) ? "vcmi.spellResearch.pay" : "vcmi.spellResearch.canNotAfford");
 			boost::replace_first(text, "%SPELL1", spell->id.toSpell()->getNameTranslated());
 			boost::replace_first(text, "%SPELL2", newSpell.toSpell()->getNameTranslated());
 			auto temp = std::make_shared<CInfoWindow>(text, LOCPLINT->playerID, resComps, pom);
 
+			temp->buttons[0]->setOverlay(std::make_shared<CPicture>(ImagePath::builtin("spellResearch/accept")));
 			temp->buttons[0]->addCallback([this, town](){ LOCPLINT->cb->spellResearch(town, spell->id, true); });
 			temp->buttons[0]->addPopupCallback([](){ CRClickPopup::createAndPush(CGI->generaltexth->translate("vcmi.spellResearch.research")); });
 			temp->buttons[0]->setEnabled(LOCPLINT->cb->getResourceAmount().canAfford(cost));
+			temp->buttons[1]->setOverlay(std::make_shared<CPicture>(ImagePath::builtin("spellResearch/reroll")));
 			temp->buttons[1]->addCallback([this, town](){ LOCPLINT->cb->spellResearch(town, spell->id, false); });
 			temp->buttons[1]->addPopupCallback([](){ CRClickPopup::createAndPush(CGI->generaltexth->translate("vcmi.spellResearch.skip")); });
+			temp->buttons[2]->setOverlay(std::make_shared<CPicture>(ImagePath::builtin("spellResearch/close")));
 			temp->buttons[2]->addPopupCallback([](){ CRClickPopup::createAndPush(CGI->generaltexth->translate("vcmi.spellResearch.abort")); });
 
 			GH.windows().pushWindow(temp);