1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +02:00

Fixed world view mode

This commit is contained in:
Ivan Savenko
2023-05-05 21:50:20 +03:00
parent 5ae507505a
commit 8e320d8454
7 changed files with 116 additions and 92 deletions

View File

@ -325,11 +325,21 @@ std::shared_ptr<CButton> InterfaceObjectConfigurable::buildButton(const JsonNode
button->setImageOrder(imgOrder[0].Integer(), imgOrder[1].Integer(), imgOrder[2].Integer(), imgOrder[3].Integer());
}
loadButtonBorderColor(button, config["borderColor"]);
loadButtonCallback(button, config["callback"]);
loadButtonHotkey(button, config["hotkey"]);
return button;
}
void InterfaceObjectConfigurable::loadButtonBorderColor(std::shared_ptr<CButton> button, const JsonNode & config) const
{
if (config.isNull())
return;
auto color = readColor(config);
button->setBorderColor(color);
}
void InterfaceObjectConfigurable::loadButtonCallback(std::shared_ptr<CButton> button, const JsonNode & config) const
{
if(config.isNull())