1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

dim adventuremap

This commit is contained in:
Michael
2023-08-29 22:22:22 +02:00
committed by GitHub
parent 695a51d8c8
commit 40c7ddcaf4
4 changed files with 21 additions and 2 deletions

View File

@@ -24,6 +24,9 @@
#include "../mapView/mapHandler.h"
#include "../mapView/MapView.h"
#include "../windows/InfoWindows.h"
#include "../windows/CCastleInterface.h"
#include "../windows/CHeroWindow.h"
#include "../windows/CKingdomInterface.h"
#include "../CGameInfo.h"
#include "../gui/CursorHandler.h"
#include "../gui/CGuiHandler.h"
@@ -153,15 +156,25 @@ void AdventureMapInterface::deactivate()
void AdventureMapInterface::showAll(Canvas & to)
{
CIntObject::showAll(to);
dim(to);
LOCPLINT->cingconsole->show(to);
}
void AdventureMapInterface::show(Canvas & to)
{
CIntObject::show(to);
dim(to);
LOCPLINT->cingconsole->show(to);
}
void AdventureMapInterface::dim(Canvas & to)
{
if(!GH.windows().findWindows<CCastleInterface>().empty() ||
!GH.windows().findWindows<CHeroWindow>().empty() ||
!GH.windows().findWindows<CKingdomInterface>().empty())
to.drawColor(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y), ColorRGBA(0, 0, 0, 128));
}
void AdventureMapInterface::tick(uint32_t msPassed)
{
handleMapScrollingUpdate(msPassed);