mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-17 20:58:07 +02:00
Merge pull request #5314 from Laserlicht/thievesguild
[1.6.4] thieves guild icons instead of text
This commit is contained in:
commit
a502a3b900
@ -57,6 +57,7 @@
|
||||
#include "../lib/texts/CGeneralTextHandler.h"
|
||||
#include "../lib/IGameSettings.h"
|
||||
#include "ConditionalWait.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "../lib/CRandomGenerator.h"
|
||||
#include "../lib/CSkillHandler.h"
|
||||
#include "../lib/CSoundBase.h"
|
||||
@ -1349,14 +1350,33 @@ CThievesGuildWindow::CThievesGuildWindow(const CGObjectInstance * _owner):
|
||||
|
||||
std::string text = CGI->generaltexth->jktexts[24+g];
|
||||
boost::algorithm::trim_if(text,boost::algorithm::is_any_of("\""));
|
||||
rowHeaders.push_back(std::make_shared<CLabel>(135, y, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, text));
|
||||
if(settings["general"]["enableUiEnhancements"].Bool() && g >= 2 && g <= 4) // add icons instead of text (text is OH3 behavior)
|
||||
{
|
||||
auto addicon = [this, y](GameResID res, int x){ columnHeaderIcons.push_back(std::make_shared<CAnimImage>(AnimationPath::builtin("SMALRES"), res, 0, x, y - 10)); };
|
||||
if(g == 2) // gold
|
||||
addicon(GameResID::GOLD, 125);
|
||||
else if(g == 3) // wood, ore
|
||||
{
|
||||
addicon(GameResID::WOOD, 110);
|
||||
addicon(GameResID::ORE, 140);
|
||||
}
|
||||
else if(g == 4) // mercury, sulfur, crystal, gems
|
||||
{
|
||||
addicon(GameResID::MERCURY, 80);
|
||||
addicon(GameResID::SULFUR, 110);
|
||||
addicon(GameResID::CRYSTAL, 140);
|
||||
addicon(GameResID::GEMS, 170);
|
||||
}
|
||||
}
|
||||
else
|
||||
rowHeaders.push_back(std::make_shared<CLabel>(135, y, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, text, 220));
|
||||
}
|
||||
|
||||
for(int g=1; g<tgi.playerColors.size(); ++g)
|
||||
columnBackgrounds.push_back(std::make_shared<CAnimImage>(AnimationPath::builtin("PRSTRIPS"), g-1, 0, 250 + 66*g, 7));
|
||||
|
||||
for(int g=0; g<tgi.playerColors.size(); ++g)
|
||||
columnHeaders.push_back(std::make_shared<CLabel>(283 + 66*g, 24, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[16+g]));
|
||||
columnHeaders.push_back(std::make_shared<CLabel>(283 + 66*g, 21, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[16+g]));
|
||||
|
||||
//printing flags
|
||||
for(int g = 0; g < std::size(fields); ++g) //by lines
|
||||
|
@ -498,6 +498,7 @@ class CThievesGuildWindow : public CStatusbarWindow
|
||||
std::vector<std::shared_ptr<CLabel>> rowHeaders;
|
||||
std::vector<std::shared_ptr<CAnimImage>> columnBackgrounds;
|
||||
std::vector<std::shared_ptr<CLabel>> columnHeaders;
|
||||
std::vector<std::shared_ptr<CAnimImage>> columnHeaderIcons;
|
||||
std::vector<std::shared_ptr<CAnimImage>> cells;
|
||||
|
||||
std::vector<std::shared_ptr<CPicture>> banners;
|
||||
|
Loading…
x
Reference in New Issue
Block a user