mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
adjustable queue size for embedded queue
This commit is contained in:
@ -852,9 +852,14 @@ StackQueue::StackQueue(bool Embedded, BattleInterface & owner)
|
||||
owner(owner)
|
||||
{
|
||||
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
||||
|
||||
uint32_t queueSize = QUEUE_SIZE_BIG;
|
||||
|
||||
if(embedded)
|
||||
{
|
||||
pos.w = QUEUE_SIZE * 41;
|
||||
queueSize = std::clamp(static_cast<int>(settings["battle"]["queueSizeEmbeddedSlots"].Float()), 1, 19);
|
||||
|
||||
pos.w = queueSize * 41;
|
||||
pos.h = 49;
|
||||
pos.x += parent->pos.w/2 - pos.w/2;
|
||||
pos.y += 10;
|
||||
@ -878,7 +883,7 @@ StackQueue::StackQueue(bool Embedded, BattleInterface & owner)
|
||||
}
|
||||
stateIcons->preload();
|
||||
|
||||
stackBoxes.resize(QUEUE_SIZE);
|
||||
stackBoxes.resize(queueSize);
|
||||
for (int i = 0; i < stackBoxes.size(); i++)
|
||||
{
|
||||
stackBoxes[i] = std::make_shared<StackBox>(this);
|
||||
|
Reference in New Issue
Block a user