1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Only show components if UI enhancements is on

This commit is contained in:
Ivan Savenko 2023-10-19 13:33:49 +03:00
parent 901fd77699
commit 0f2922d064

View File

@ -352,10 +352,13 @@ void CRClickPopup::createAndPush(const CGObjectInstance * obj, const Point & p,
else
{
std::vector<Component> components;
if(LOCPLINT->localState->getCurrentHero())
components = obj->getPopupComponents(LOCPLINT->localState->getCurrentHero());
else
components = obj->getPopupComponents(LOCPLINT->playerID);
if (settings["general"]["enableUiEnhancements"].Bool())
{
if(LOCPLINT->localState->getCurrentHero())
components = obj->getPopupComponents(LOCPLINT->localState->getCurrentHero());
else
components = obj->getPopupComponents(LOCPLINT->playerID);
}
std::vector<std::shared_ptr<CComponent>> guiComponents;
for (auto & component : components)