diff --git a/client/battle/BattleInterfaceClasses.cpp b/client/battle/BattleInterfaceClasses.cpp index df730dcca..e2cd006c1 100644 --- a/client/battle/BattleInterfaceClasses.cpp +++ b/client/battle/BattleInterfaceClasses.cpp @@ -857,12 +857,14 @@ StackQueue::StackQueue(bool Embedded, BattleInterface & owner) if(embedded) { - queueSize = std::clamp(static_cast(settings["battle"]["queueSmallSlots"].Float()), 1, 19); + int32_t queueSmallOutsideYOffset = 65; + bool queueSmallOutside = settings["battle"]["queueSmallOutside"].Bool() && (pos.y - queueSmallOutsideYOffset) >= 0; + queueSize = std::clamp(static_cast(settings["battle"]["queueSmallSlots"].Float()), 1, queueSmallOutside ? GH.screenDimensions().x / 41 : 19); pos.w = queueSize * 41; pos.h = 49; pos.x += parent->pos.w/2 - pos.w/2; - pos.y += 10; + pos.y += queueSmallOutside ? -queueSmallOutsideYOffset : 10; icons = GH.renderHandler().loadAnimation(AnimationPath::builtin("CPRSMALL")); stateIcons = GH.renderHandler().loadAnimation(AnimationPath::builtin("VCMI/BATTLEQUEUE/STATESSMALL")); diff --git a/config/schemas/settings.json b/config/schemas/settings.json index 0a2bb6e2c..c5b076a39 100644 --- a/config/schemas/settings.json +++ b/config/schemas/settings.json @@ -304,7 +304,7 @@ "type" : "object", "additionalProperties" : false, "default" : {}, - "required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "movementHighlightOnHover", "rangeLimitHighlightOnHover", "showQueue", "swipeAttackDistance", "queueSize", "stickyHeroInfoWindows", "enableAutocombatSpells", "endWithAutocombat", "queueSmallSlots" ], + "required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "movementHighlightOnHover", "rangeLimitHighlightOnHover", "showQueue", "swipeAttackDistance", "queueSize", "stickyHeroInfoWindows", "enableAutocombatSpells", "endWithAutocombat", "queueSmallSlots", "queueSmallOutside" ], "properties" : { "speedFactor" : { "type" : "number", @@ -358,6 +358,10 @@ "queueSmallSlots" : { "type": "number", "default": 10 + }, + "queueSmallOutside" : { + "type": "boolean", + "default": false } } },