MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setZoom

Method setZoom

src/Geoscape/Globe.cpp:675–687  ·  view source on GitHub ↗

* Changes the current globe zoom factor. * @param zoom New zoom. */

Source from the content-addressed store, hash-verified

673 * @param zoom New zoom.
674 */
675void Globe::setZoom(size_t zoom)
676{
677 _zoom = std::min(std::max(zoom, (size_t)0u), _zoomRadius.size() - 1);
678 _radius = _zoomRadius[_zoom];
679 _game->getSavedGame()->setGlobeZoom(_zoom);
680 if (_isMouseScrolling)
681 {
682 _lonBeforeMouseScrolling = _cenLon;
683 _latBeforeMouseScrolling = _cenLat;
684 _totalMouseMoveX = 0; _totalMouseMoveY = 0;
685 }
686 invalidate();
687}
688
689/**
690 * Increases the zoom level on the globe.

Callers

nothing calls this directly

Calls 2

setGlobeZoomMethod · 0.80
getSavedGameMethod · 0.80

Tested by

no test coverage detected