|
|
|
@ -896,14 +896,14 @@ namespace MWGui
|
|
|
|
|
void MapWindow::onMapZoomed(MyGUI::Widget* sender, int rel)
|
|
|
|
|
{
|
|
|
|
|
const static int localWidgetSize = Settings::Manager::getInt("local map widget size", "Map");
|
|
|
|
|
const static int globalCellSize = Settings::Manager::getInt("global map cell size", "Map");
|
|
|
|
|
|
|
|
|
|
const bool zoomOut = rel < 0;
|
|
|
|
|
const bool zoomIn = !zoomOut;
|
|
|
|
|
const double speedDiff = zoomOut ? 1.0 / speed : speed;
|
|
|
|
|
const float localMapSizeInUnits = localWidgetSize * mNumCells;
|
|
|
|
|
|
|
|
|
|
const float currentMinLocalMapZoom = std::max({ (float(globalCellSize) * 4.f) / float(localWidgetSize),
|
|
|
|
|
const float currentMinLocalMapZoom = std::max({ (float(Settings::map().mGlobalMapCellSize) * 4.f)
|
|
|
|
|
/ float(localWidgetSize),
|
|
|
|
|
float(mLocalMap->getWidth()) / localMapSizeInUnits, float(mLocalMap->getHeight()) / localMapSizeInUnits });
|
|
|
|
|
|
|
|
|
|
if (mGlobal)
|
|
|
|
|