|
@@ -86,30 +86,34 @@ BattleWindow::BattleWindow(BattleInterface & owner):
|
|
|
void BattleWindow::createQueue()
|
|
|
{
|
|
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
|
|
-
|
|
|
- //create stack queue and adjust our own position
|
|
|
- bool embedQueue;
|
|
|
- std::string queueSize = settings["battle"]["queueSize"].String();
|
|
|
-
|
|
|
- if(queueSize == "auto")
|
|
|
- embedQueue = GH.screenDimensions().y < 700;
|
|
|
- else
|
|
|
- embedQueue = GH.screenDimensions().y < 700 || queueSize == "small";
|
|
|
-
|
|
|
- queue = std::make_shared<StackQueue>(embedQueue, owner);
|
|
|
- if(!embedQueue && settings["battle"]["showQueue"].Bool())
|
|
|
- {
|
|
|
- //re-center, taking into account stack queue position
|
|
|
- pos.y -= queue->pos.h;
|
|
|
- pos.h += queue->pos.h;
|
|
|
- pos = center();
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-BattleWindow::~BattleWindow()
|
|
|
-{
|
|
|
- CPlayerInterface::battleInt = nullptr;
|
|
|
-}
|
|
|
+
|
|
|
+ //create stack queue and adjust our own position
|
|
|
+ bool embedQueue;
|
|
|
+ bool showQueue = settings["battle"]["showQueue"].Bool();
|
|
|
+ std::string queueSize = settings["battle"]["queueSize"].String();
|
|
|
+
|
|
|
+ if(queueSize == "auto")
|
|
|
+ embedQueue = GH.screenDimensions().y < 700;
|
|
|
+ else
|
|
|
+ embedQueue = GH.screenDimensions().y < 700 || queueSize == "small";
|
|
|
+
|
|
|
+ queue = std::make_shared<StackQueue>(embedQueue, owner);
|
|
|
+ if(!embedQueue && showQueue)
|
|
|
+ {
|
|
|
+ //re-center, taking into account stack queue position
|
|
|
+ pos.y -= queue->pos.h;
|
|
|
+ pos.h += queue->pos.h;
|
|
|
+ pos = center();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!showQueue)
|
|
|
+ queue->disable();
|
|
|
+}
|
|
|
+
|
|
|
+BattleWindow::~BattleWindow()
|
|
|
+{
|
|
|
+ CPlayerInterface::battleInt = nullptr;
|
|
|
+}
|
|
|
|
|
|
std::shared_ptr<BattleConsole> BattleWindow::buildBattleConsole(const JsonNode & config) const
|
|
|
{
|
|
@@ -140,14 +144,14 @@ void BattleWindow::hideQueue()
|
|
|
if (!queue->embedded)
|
|
|
{
|
|
|
//re-center, taking into account stack queue position
|
|
|
- pos.y += queue->pos.h;
|
|
|
- pos.h -= queue->pos.h;
|
|
|
- pos = center();
|
|
|
- GH.totalRedraw();
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void BattleWindow::showQueue()
|
|
|
+ pos.y += queue->pos.h;
|
|
|
+ pos.h -= queue->pos.h;
|
|
|
+ pos = center();
|
|
|
+ }
|
|
|
+ GH.totalRedraw();
|
|
|
+}
|
|
|
+
|
|
|
+void BattleWindow::showQueue()
|
|
|
{
|
|
|
if(settings["battle"]["showQueue"].Bool() == true)
|
|
|
return;
|