1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Do not block map layer toggles in world view mode

This commit is contained in:
Ivan Savenko 2023-09-11 18:10:57 +03:00
parent a5e42755be
commit a09147a433
2 changed files with 28 additions and 14 deletions

View File

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

View File

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