mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
possibility to show small queue outside
This commit is contained in:
parent
25188aead8
commit
5e3f0e631c
@ -857,12 +857,14 @@ StackQueue::StackQueue(bool Embedded, BattleInterface & owner)
|
||||
|
||||
if(embedded)
|
||||
{
|
||||
queueSize = std::clamp(static_cast<int>(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<int>(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"));
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user