mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 09:32:45 +00:00
Disable zooming when setting is off
This commit is contained in:
parent
0a73771f17
commit
b27de8f188
@ -791,14 +791,17 @@ namespace MWGui
|
||||
getWidget(mEventBoxGlobal, "EventBoxGlobal");
|
||||
mEventBoxGlobal->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
||||
mEventBoxGlobal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
||||
mEventBoxGlobal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
||||
const bool allowZooming = Settings::Manager::getBool("allow zooming", "Map");
|
||||
if(allowZooming)
|
||||
mEventBoxGlobal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
||||
mEventBoxGlobal->setDepth(Global_ExploreOverlayLayer);
|
||||
|
||||
getWidget(mEventBoxLocal, "EventBoxLocal");
|
||||
mEventBoxLocal->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
||||
mEventBoxLocal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
||||
mEventBoxLocal->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &MapWindow::onMapDoubleClicked);
|
||||
mEventBoxLocal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
||||
if (allowZooming)
|
||||
mEventBoxLocal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
||||
|
||||
LocalMapBase::init(mLocalMap, mPlayerArrowLocal, getLocalViewingDistance());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user