1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Added option to configure dropdown position

This commit is contained in:
Ivan Savenko
2023-11-23 17:19:49 +02:00
parent 0fd966818f
commit 1f0bcbc194
3 changed files with 10 additions and 8 deletions

View File

@ -560,9 +560,11 @@ std::shared_ptr<ComboBox> InterfaceObjectConfigurable::buildComboBox(const JsonN
{
logGlobal->debug("Building widget ComboBox");
auto position = readPosition(config["position"]);
auto dropDownPosition = readPosition(config["dropDownPosition"]);
auto image = AnimationPath::fromJson(config["image"]);
auto help = readHintText(config["help"]);
auto result = std::make_shared<ComboBox>(position, image, help, config["dropDown"]);
auto result = std::make_shared<ComboBox>(position, image, help, config["dropDown"], dropDownPosition);
if(!config["items"].isNull())
{
for(const auto & item : config["items"].Vector())