* Changes the current globe zoom factor. * @param zoom New zoom. */
| 673 | * @param zoom New zoom. |
| 674 | */ |
| 675 | void 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. |
nothing calls this directly
no test coverage detected