mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-22 06:23:07 +00:00
Properly account for map tile visibility
This commit is contained in:
parent
839520b9a4
commit
cd60d0e8c5
1 changed files with 4 additions and 3 deletions
|
|
@ -604,7 +604,7 @@ namespace MWGui
|
||||||
bool needRedraw = false;
|
bool needRedraw = false;
|
||||||
for (MapEntry& entry : mMaps)
|
for (MapEntry& entry : mMaps)
|
||||||
{
|
{
|
||||||
if (widgetCropped(entry.mMapWidget, mLocalMap))
|
if (!entry.mMapWidget->getVisible() || widgetCropped(entry.mMapWidget, mLocalMap))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!entry.mMapTexture)
|
if (!entry.mMapTexture)
|
||||||
|
|
@ -750,6 +750,8 @@ namespace MWGui
|
||||||
= MyGUI::IntSize(static_cast<int>(std::ceil(mapWidgetSize)), static_cast<int>(std::ceil(mapWidgetSize)));
|
= MyGUI::IntSize(static_cast<int>(std::ceil(mapWidgetSize)), static_cast<int>(std::ceil(mapWidgetSize)));
|
||||||
for (auto& entry : mMaps)
|
for (auto& entry : mMaps)
|
||||||
{
|
{
|
||||||
|
if (!entry.mMapWidget->getVisible())
|
||||||
|
continue;
|
||||||
const auto position = getPosition(entry.mCellX, entry.mCellY, 0, 0);
|
const auto position = getPosition(entry.mCellX, entry.mCellY, 0, 0);
|
||||||
entry.mMapWidget->setCoord({ position, size });
|
entry.mMapWidget->setCoord({ position, size });
|
||||||
entry.mFogWidget->setCoord({ position, size });
|
entry.mFogWidget->setCoord({ position, size });
|
||||||
|
|
@ -1384,8 +1386,7 @@ namespace MWGui
|
||||||
NoDrop::setAlpha(alpha);
|
NoDrop::setAlpha(alpha);
|
||||||
// can't allow showing map with partial transparency, as the fog of war will also go transparent
|
// 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
|
// and reveal parts of the map you shouldn't be able to see
|
||||||
for (MapEntry& entry : mMaps)
|
mLocalMap->setVisible(alpha == 1);
|
||||||
entry.mMapWidget->setVisible(alpha == 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::customMarkerCreated(MyGUI::Widget* marker)
|
void MapWindow::customMarkerCreated(MyGUI::Widget* marker)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue