forked from mirror/openmw-tes3mp
Validate map size
This commit is contained in:
parent
359e748c28
commit
441463327c
2 changed files with 6 additions and 2 deletions
|
@ -158,7 +158,9 @@ namespace MWGui
|
|||
|
||||
getWidget(mCrosshair, "Crosshair");
|
||||
|
||||
LocalMapBase::init(mMinimap, mCompass, Settings::Manager::getInt("local map hud widget size", "Map"), Settings::Manager::getInt("local map cell distance", "Map"));
|
||||
int mapSize = std::max(1, Settings::Manager::getInt("local map hud widget size", "Map"));
|
||||
int cellDistance = std::max(1, Settings::Manager::getInt("local map cell distance", "Map"));
|
||||
LocalMapBase::init(mMinimap, mCompass, mapSize, cellDistance);
|
||||
|
||||
mMainWidget->eventMouseButtonClick += MyGUI::newDelegate(this, &HUD::onWorldClicked);
|
||||
mMainWidget->eventMouseMove += MyGUI::newDelegate(this, &HUD::onWorldMouseOver);
|
||||
|
|
|
@ -679,7 +679,9 @@ namespace MWGui
|
|||
mEventBoxLocal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
||||
mEventBoxLocal->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &MapWindow::onMapDoubleClicked);
|
||||
|
||||
LocalMapBase::init(mLocalMap, mPlayerArrowLocal, Settings::Manager::getInt("local map widget size", "Map"), Settings::Manager::getInt("local map cell distance", "Map"));
|
||||
int mapSize = std::max(1, Settings::Manager::getInt("local map widget size", "Map"));
|
||||
int cellDistance = std::max(1, Settings::Manager::getInt("local map cell distance", "Map"));
|
||||
LocalMapBase::init(mLocalMap, mPlayerArrowLocal, mapSize, cellDistance);
|
||||
|
||||
mGlobalMap->setVisible(mGlobal);
|
||||
mLocalMap->setVisible(!mGlobal);
|
||||
|
|
Loading…
Reference in a new issue