2
0
Эх сурвалжийг харах

Fix positioning of UI elements in BattleWindow

Ivan Savenko 2 жил өмнө
parent
commit
f155a35378

+ 4 - 0
client/battle/BattleWindow.cpp

@@ -205,6 +205,8 @@ void BattleWindow::tacticPhaseStarted()
 	menuTactics->enable();
 	menuTactics->enable();
 	tacticNext->enable();
 	tacticNext->enable();
 	tacticEnd->enable();
 	tacticEnd->enable();
+
+	redraw();
 }
 }
 
 
 void BattleWindow::tacticPhaseEnded()
 void BattleWindow::tacticPhaseEnded()
@@ -221,6 +223,8 @@ void BattleWindow::tacticPhaseEnded()
 	menuTactics->disable();
 	menuTactics->disable();
 	tacticNext->disable();
 	tacticNext->disable();
 	tacticEnd->disable();
 	tacticEnd->disable();
+
+	redraw();
 }
 }
 
 
 void BattleWindow::bOptionsf()
 void BattleWindow::bOptionsf()

+ 14 - 14
config/widgets/battleWindow.json

@@ -12,13 +12,13 @@
 			"type": "picture",
 			"type": "picture",
 			"name": "menuBattle",
 			"name": "menuBattle",
 			"playerColored" : true,
 			"playerColored" : true,
-			"position": {"x": 0, "y": 556},
+			"position": {"x": 1, "y": 555},
 			"image": "CBAR.bmp"
 			"image": "CBAR.bmp"
 		},
 		},
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "options",
 			"name": "options",
-			"position": {"x": 3, "y": 561},
+			"position": {"x": 4, "y": 560},
 			"image": "icm003",
 			"image": "icm003",
 			"zelp": 381,
 			"zelp": 381,
 			"callback": "options",
 			"callback": "options",
@@ -28,7 +28,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "surrender",
 			"name": "surrender",
-			"position": {"x": 54, "y": 561},
+			"position": {"x": 55, "y": 560},
 			"image": "icm001",
 			"image": "icm001",
 			"zelp": 379,
 			"zelp": 379,
 			"callback": "surrender",
 			"callback": "surrender",
@@ -38,7 +38,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "flee",
 			"name": "flee",
-			"position": {"x": 105, "y": 561},
+			"position": {"x": 106, "y": 560},
 			"image": "icm002",
 			"image": "icm002",
 			"zelp": 380,
 			"zelp": 380,
 			"callback": "flee",
 			"callback": "flee",
@@ -48,7 +48,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "autofight",
 			"name": "autofight",
-			"position": {"x": 157, "y": 561},
+			"position": {"x": 157, "y": 560},
 			"image": "icm004",
 			"image": "icm004",
 			"zelp": 382,
 			"zelp": 382,
 			"callback": "autofight",
 			"callback": "autofight",
@@ -58,7 +58,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "cast",
 			"name": "cast",
-			"position": {"x": 645, "y": 561},
+			"position": {"x": 646, "y": 560},
 			"image": "icm005",
 			"image": "icm005",
 			"zelp": 385,
 			"zelp": 385,
 			"callback": "spellbook",
 			"callback": "spellbook",
@@ -68,7 +68,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "wait",
 			"name": "wait",
-			"position": {"x": 696, "y": 561},
+			"position": {"x": 697, "y": 560},
 			"image": "icm006",
 			"image": "icm006",
 			"zelp": 386,
 			"zelp": 386,
 			"callback": "wait",
 			"callback": "wait",
@@ -78,7 +78,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "defence",
 			"name": "defence",
-			"position": {"x": 747, "y": 561},
+			"position": {"x": 748, "y": 560},
 			"image": "icm007",
 			"image": "icm007",
 			"zelp": 387,
 			"zelp": 387,
 			"callback": "defence",
 			"callback": "defence",
@@ -88,7 +88,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "consoleUp",
 			"name": "consoleUp",
-			"position": {"x": 624, "y": 561},
+			"position": {"x": 625, "y": 560},
 			"image": "ComSlide",
 			"image": "ComSlide",
 			"zelp": "",
 			"zelp": "",
 			"callback": "consoleUp",
 			"callback": "consoleUp",
@@ -99,7 +99,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "consoleDown",
 			"name": "consoleDown",
-			"position": {"x": 624, "y": 580},
+			"position": {"x": 625, "y": 579},
 			"image": "ComSlide",
 			"image": "ComSlide",
 			"zelp": "",
 			"zelp": "",
 			"callback": "consoleDown",
 			"callback": "consoleDown",
@@ -110,14 +110,14 @@
 		{
 		{
 			"type": "battleConsole",
 			"type": "battleConsole",
 			"name": "console",
 			"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",
 			"type": "button",
 			"name": "tacticNext",
 			"name": "tacticNext",
-			"position": {"x": 213, "y": 561},
+			"position": {"x": 213, "y": 560},
 			"image": "icm011",
 			"image": "icm011",
 			"zelp": "",
 			"zelp": "",
 			"callback": "tacticNext",
 			"callback": "tacticNext",
@@ -127,7 +127,7 @@
 		{
 		{
 			"type": "button",
 			"type": "button",
 			"name": "tacticEnd",
 			"name": "tacticEnd",
-			"position": {"x": 419, "y": 561},
+			"position": {"x": 419, "y": 560},
 			"image": "icm012",
 			"image": "icm012",
 			"zelp": "",
 			"zelp": "",
 			"callback": "tacticEnd",
 			"callback": "tacticEnd",