mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-21 10:59:21 -04:00
Properly account for map tile visibility
This commit is contained in:
parent
6e45e562a8
commit
d6ce23aba7
@ -603,7 +603,7 @@ namespace MWGui
|
||||
bool needRedraw = false;
|
||||
for (MapEntry& entry : mMaps)
|
||||
{
|
||||
if (widgetCropped(entry.mMapWidget, mLocalMap))
|
||||
if (!entry.mMapWidget->getVisible() || widgetCropped(entry.mMapWidget, mLocalMap))
|
||||
continue;
|
||||
|
||||
if (!entry.mMapTexture)
|
||||
@ -748,6 +748,8 @@ namespace MWGui
|
||||
const auto size = MyGUI::IntSize(std::ceil(mapWidgetSize), std::ceil(mapWidgetSize));
|
||||
for (auto& entry : mMaps)
|
||||
{
|
||||
if (!entry.mMapWidget->getVisible())
|
||||
continue;
|
||||
const auto position = getPosition(entry.mCellX, entry.mCellY, 0, 0);
|
||||
entry.mMapWidget->setCoord({ position, size });
|
||||
entry.mFogWidget->setCoord({ position, size });
|
||||
@ -1377,8 +1379,7 @@ namespace MWGui
|
||||
NoDrop::setAlpha(alpha);
|
||||
// can't allow showing map with partial transparency, as the fog of war will also go transparent
|
||||
// and reveal parts of the map you shouldn't be able to see
|
||||
for (MapEntry& entry : mMaps)
|
||||
entry.mMapWidget->setVisible(alpha == 1);
|
||||
mLocalMap->setVisible(alpha == 1);
|
||||
}
|
||||
|
||||
void MapWindow::customMarkerCreated(MyGUI::Widget* marker)
|
||||
|
Loading…
x
Reference in New Issue
Block a user