mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-10 07:48:31 +07:00
Make map editor respond to max zoom setting. (#8179)
This commit is contained in:
@ -46,6 +46,13 @@ class EditorMapHolder(
|
|||||||
continuousScrollingX = tileMap.mapParameters.worldWrap
|
continuousScrollingX = tileMap.mapParameters.worldWrap
|
||||||
addTiles(parentScreen.stage)
|
addTiles(parentScreen.stage)
|
||||||
if (editorScreen != null) addCaptureListener(getDragPaintListener())
|
if (editorScreen != null) addCaptureListener(getDragPaintListener())
|
||||||
|
reloadMaxZoom()
|
||||||
|
}
|
||||||
|
|
||||||
|
internal fun reloadMaxZoom() {
|
||||||
|
maxZoom = UncivGame.Current.settings.maxWorldZoomOut
|
||||||
|
minZoom = 1f / maxZoom
|
||||||
|
if (scaleX < minZoom) zoom(1f) // since normally min isn't reached exactly, only powers of 0.8
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun addTiles(stage: Stage) {
|
internal fun addTiles(stage: Stage) {
|
||||||
|
Reference in New Issue
Block a user