From f155a3537836d7b1c24b288f4028aed234f17e7d Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 9 Jan 2023 17:25:49 +0200 Subject: [PATCH] Fix positioning of UI elements in BattleWindow --- client/battle/BattleWindow.cpp | 4 ++++ config/widgets/battleWindow.json | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/client/battle/BattleWindow.cpp b/client/battle/BattleWindow.cpp index 626b10167..76b57776b 100644 --- a/client/battle/BattleWindow.cpp +++ b/client/battle/BattleWindow.cpp @@ -205,6 +205,8 @@ void BattleWindow::tacticPhaseStarted() menuTactics->enable(); tacticNext->enable(); tacticEnd->enable(); + + redraw(); } void BattleWindow::tacticPhaseEnded() @@ -221,6 +223,8 @@ void BattleWindow::tacticPhaseEnded() menuTactics->disable(); tacticNext->disable(); tacticEnd->disable(); + + redraw(); } void BattleWindow::bOptionsf() diff --git a/config/widgets/battleWindow.json b/config/widgets/battleWindow.json index 09fe11121..d7872cd96 100644 --- a/config/widgets/battleWindow.json +++ b/config/widgets/battleWindow.json @@ -12,13 +12,13 @@ "type": "picture", "name": "menuBattle", "playerColored" : true, - "position": {"x": 0, "y": 556}, + "position": {"x": 1, "y": 555}, "image": "CBAR.bmp" }, { "type": "button", "name": "options", - "position": {"x": 3, "y": 561}, + "position": {"x": 4, "y": 560}, "image": "icm003", "zelp": 381, "callback": "options", @@ -28,7 +28,7 @@ { "type": "button", "name": "surrender", - "position": {"x": 54, "y": 561}, + "position": {"x": 55, "y": 560}, "image": "icm001", "zelp": 379, "callback": "surrender", @@ -38,7 +38,7 @@ { "type": "button", "name": "flee", - "position": {"x": 105, "y": 561}, + "position": {"x": 106, "y": 560}, "image": "icm002", "zelp": 380, "callback": "flee", @@ -48,7 +48,7 @@ { "type": "button", "name": "autofight", - "position": {"x": 157, "y": 561}, + "position": {"x": 157, "y": 560}, "image": "icm004", "zelp": 382, "callback": "autofight", @@ -58,7 +58,7 @@ { "type": "button", "name": "cast", - "position": {"x": 645, "y": 561}, + "position": {"x": 646, "y": 560}, "image": "icm005", "zelp": 385, "callback": "spellbook", @@ -68,7 +68,7 @@ { "type": "button", "name": "wait", - "position": {"x": 696, "y": 561}, + "position": {"x": 697, "y": 560}, "image": "icm006", "zelp": 386, "callback": "wait", @@ -78,7 +78,7 @@ { "type": "button", "name": "defence", - "position": {"x": 747, "y": 561}, + "position": {"x": 748, "y": 560}, "image": "icm007", "zelp": 387, "callback": "defence", @@ -88,7 +88,7 @@ { "type": "button", "name": "consoleUp", - "position": {"x": 624, "y": 561}, + "position": {"x": 625, "y": 560}, "image": "ComSlide", "zelp": "", "callback": "consoleUp", @@ -99,7 +99,7 @@ { "type": "button", "name": "consoleDown", - "position": {"x": 624, "y": 580}, + "position": {"x": 625, "y": 579}, "image": "ComSlide", "zelp": "", "callback": "consoleDown", @@ -110,14 +110,14 @@ { "type": "battleConsole", "name": "console", - "imagePosition" : { "x" : 211, "y" : 4 }, - "rect": {"x": 211, "y": 561, "w": 406, "h": 38} + "imagePosition" : { "x" : 214, "y" : 7 }, + "rect": {"x": 215, "y": 562, "w": 400, "h": 32} }, { "type": "button", "name": "tacticNext", - "position": {"x": 213, "y": 561}, + "position": {"x": 213, "y": 560}, "image": "icm011", "zelp": "", "callback": "tacticNext", @@ -127,7 +127,7 @@ { "type": "button", "name": "tacticEnd", - "position": {"x": 419, "y": 561}, + "position": {"x": 419, "y": 560}, "image": "icm012", "zelp": "", "callback": "tacticEnd",