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

Do not block map layer toggles in world view mode

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

+ 1 - 1
client/adventureMap/AdventureMapShortcuts.cpp

@@ -402,7 +402,7 @@ bool AdventureMapShortcuts::optionCanViewQuests()
 
 bool AdventureMapShortcuts::optionCanToggleLevel()
 {
-	return optionInMapView() && LOCPLINT->cb->getMapSize().z > 1;
+	return optionSidePanelActive() && LOCPLINT->cb->getMapSize().z > 1;
 }
 
 bool AdventureMapShortcuts::optionMapLevelSurface()

+ 27 - 13
config/widgets/adventureMap.json

@@ -126,7 +126,7 @@
 							"playerColored" : true,
 							"area": { "top" : 0, "left": 0, "width" : 32, "height" : 32 }
 						}
-					],
+					]
 				},
 				{
 					"type": "adventureMapContainer",
@@ -142,7 +142,7 @@
 							"playerColored" : true,
 							"area": { "top" : 0, "left": 0, "width" : 32, "height" : 32 }
 						}
-					],
+					]
 				},
 				{
 					"type": "adventureMapButton",
@@ -507,12 +507,19 @@
 					"area": { "top" : 23, "left": 128, "width" : 60, "height" : 32 }
 				},
 				{
-					"type": "adventureMapButton",
-					"name": "worldViewSurface",
-					"image" : "IAM003.DEF",
-					"hotkey": "adventureToggleMapLevel",
-					"playerColored" : true,
-					"area": { "top" : 79, "left": 343, "width" : 32, "height" : 32 }
+					"type": "adventureMapContainer",
+					"hideWhen" : "mapLayerSurface",
+					"area": { "top" : 343, "left": 79, "width" : 32, "height" : 32 }
+					"items" : [
+						{
+							"type": "adventureMapButton",
+							"name": "worldViewSurface",
+							"image" : "IAM003.DEF",
+							"hotkey": "adventureToggleMapLevel",
+							"playerColored" : true,
+							"area": { "top" : 0, "left": 0, "width" : 32, "height" : 32 }
+						}
+					]
 				},
 				{
 					"type": "adventureMapButton",
@@ -523,12 +530,19 @@
 					"area": { "top" : 343, "left": 5, "width" : 66, "height" : 32 }
 				},
 				{
-					"type": "adventureMapButton",
-					"name": "worldViewUnderground",
-					"image" : "IAM010.DEF",
-					"playerColored" : true,
-					"hotkey": "adventureToggleMapLevel",
+					"type": "adventureMapContainer",
+					"hideWhen" : "mapLayerUnderground",
 					"area": { "top" : 343, "left": 79, "width" : 32, "height" : 32 }
+					"items" : [
+						{
+							"type": "adventureMapButton",
+							"name": "worldViewUnderground",
+							"image" : "IAM010.DEF",
+							"playerColored" : true,
+							"hotkey": "adventureToggleMapLevel",
+							"area": { "top" : 0, "left": 0, "width" : 32, "height" : 32 }
+						}
+					]
 				},
 				{
 					"type": "adventureMapButton",