mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 05:39:42 +00:00
fix a problem where hovering a marker would render it on top of the fog of war instead of below
This commit is contained in:
parent
7eaf5e7f0f
commit
1c5055c8ac
2 changed files with 15 additions and 0 deletions
|
@ -93,6 +93,16 @@ void LocalMapBase::applyFogOfWar()
|
|||
}
|
||||
}
|
||||
|
||||
void LocalMapBase::onMarkerFocused (MyGUI::Widget* w1, MyGUI::Widget* w2)
|
||||
{
|
||||
applyFogOfWar ();
|
||||
}
|
||||
|
||||
void LocalMapBase::onMarkerUnfocused (MyGUI::Widget* w1, MyGUI::Widget* w2)
|
||||
{
|
||||
applyFogOfWar ();
|
||||
}
|
||||
|
||||
void LocalMapBase::setActiveCell(const int x, const int y, bool interior)
|
||||
{
|
||||
if (x==mCurX && y==mCurY && mInterior==interior && !mChanged) return; // don't do anything if we're still in the same cell
|
||||
|
@ -173,6 +183,8 @@ void LocalMapBase::setActiveCell(const int x, const int y, bool interior)
|
|||
markerWidget->setUserString("ToolTipLayout", "TextToolTip");
|
||||
markerWidget->setUserString("Caption_Text", marker.name);
|
||||
markerWidget->setUserString("IsMarker", "true");
|
||||
markerWidget->eventMouseSetFocus += MyGUI::newDelegate(this, &LocalMapBase::onMarkerFocused);
|
||||
markerWidget->eventMouseLostFocus += MyGUI::newDelegate(this, &LocalMapBase::onMarkerUnfocused);
|
||||
|
||||
MarkerPosition markerPos;
|
||||
markerPos.interior = interior;
|
||||
|
|
|
@ -41,6 +41,9 @@ namespace MWGui
|
|||
|
||||
void applyFogOfWar();
|
||||
|
||||
void onMarkerFocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
|
||||
void onMarkerUnfocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
|
||||
|
||||
OEngine::GUI::Layout* mLayout;
|
||||
|
||||
bool mMapDragAndDrop;
|
||||
|
|
Loading…
Reference in a new issue