mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-21 01:41:33 +00:00
Disable zooming when setting is off
This commit is contained in:
parent
0a73771f17
commit
b27de8f188
1 changed files with 5 additions and 2 deletions
|
@ -791,6 +791,8 @@ namespace MWGui
|
||||||
getWidget(mEventBoxGlobal, "EventBoxGlobal");
|
getWidget(mEventBoxGlobal, "EventBoxGlobal");
|
||||||
mEventBoxGlobal->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
mEventBoxGlobal->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
||||||
mEventBoxGlobal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
mEventBoxGlobal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
||||||
|
const bool allowZooming = Settings::Manager::getBool("allow zooming", "Map");
|
||||||
|
if(allowZooming)
|
||||||
mEventBoxGlobal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
mEventBoxGlobal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
||||||
mEventBoxGlobal->setDepth(Global_ExploreOverlayLayer);
|
mEventBoxGlobal->setDepth(Global_ExploreOverlayLayer);
|
||||||
|
|
||||||
|
@ -798,6 +800,7 @@ namespace MWGui
|
||||||
mEventBoxLocal->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
mEventBoxLocal->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
||||||
mEventBoxLocal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
mEventBoxLocal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
||||||
mEventBoxLocal->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &MapWindow::onMapDoubleClicked);
|
mEventBoxLocal->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &MapWindow::onMapDoubleClicked);
|
||||||
|
if (allowZooming)
|
||||||
mEventBoxLocal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
mEventBoxLocal->eventMouseWheel += MyGUI::newDelegate(this, &MapWindow::onMapZoomed);
|
||||||
|
|
||||||
LocalMapBase::init(mLocalMap, mPlayerArrowLocal, getLocalViewingDistance());
|
LocalMapBase::init(mLocalMap, mPlayerArrowLocal, getLocalViewingDistance());
|
||||||
|
|
Loading…
Reference in a new issue