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

Merge pull request #3982 from Laserlicht/hotseat_hide

Fix hotseat hide
This commit is contained in:
Ivan Savenko 2024-05-15 13:15:22 +03:00 committed by GitHub
commit a7d5a081b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -184,7 +184,7 @@ void AdventureMapInterface::dim(Canvas & to)
}
for (auto window : GH.windows().findWindows<CIntObject>())
{
if (!std::dynamic_pointer_cast<AdventureMapInterface>(window) && !std::dynamic_pointer_cast<RadialMenu>(window) && !window->isPopupWindow() && (settings["adventure"]["backgroundDimSmallWindows"].Bool() || isBigWindow(window)))
if (!std::dynamic_pointer_cast<AdventureMapInterface>(window) && !std::dynamic_pointer_cast<RadialMenu>(window) && !window->isPopupWindow() && (settings["adventure"]["backgroundDimSmallWindows"].Bool() || isBigWindow(window) || shortcuts->getState() == EAdventureState::HOTSEAT_WAIT))
{
Rect targetRect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y);
ColorRGBA colorToFill(0, 0, 0, std::clamp<int>(backgroundDimLevel, 0, 255));

View File

@ -47,6 +47,11 @@ void AdventureMapShortcuts::setState(EAdventureState newState)
state = newState;
}
EAdventureState AdventureMapShortcuts::getState()
{
return state;
}
void AdventureMapShortcuts::onMapViewMoved(const Rect & visibleArea, int newMapLevel)
{
mapLevel = newMapLevel;

View File

@ -89,5 +89,6 @@ public:
bool optionMapViewActive();
void setState(EAdventureState newState);
EAdventureState getState();
void onMapViewMoved(const Rect & visibleArea, int mapLevel);
};