diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index a88f30b14..27df90232 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -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(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(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(135, y, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, text)); } for(int g=1; g(AnimationPath::builtin("PRSTRIPS"), g-1, 0, 250 + 66*g, 7)); for(int g=0; g(283 + 66*g, 24, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, CGI->generaltexth->jktexts[16+g])); + columnHeaders.push_back(std::make_shared(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 diff --git a/client/windows/GUIClasses.h b/client/windows/GUIClasses.h index 04676ab48..555c46cf7 100644 --- a/client/windows/GUIClasses.h +++ b/client/windows/GUIClasses.h @@ -498,6 +498,7 @@ class CThievesGuildWindow : public CStatusbarWindow std::vector> rowHeaders; std::vector> columnBackgrounds; std::vector> columnHeaders; + std::vector> columnHeaderIcons; std::vector> cells; std::vector> banners;