From f884f30226edfc1d624b4b682f6ca25cfa0db016 Mon Sep 17 00:00:00 2001 From: itanasi <44038014+itanasi@users.noreply.github.com> Date: Thu, 17 Mar 2022 13:25:24 -0700 Subject: [PATCH] Double Zoom Out Range (#6354) * Simple dumb solution. Just make WorldMapHolder twice as big! * A bunch of attempts * Just change to max 4x size Co-authored-by: itanasi --- core/src/com/unciv/ui/utils/ZoomableScrollPane.kt | 2 +- core/src/com/unciv/ui/worldscreen/WorldMapHolder.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/ui/utils/ZoomableScrollPane.kt b/core/src/com/unciv/ui/utils/ZoomableScrollPane.kt index baafc76e61..fc32912ee0 100644 --- a/core/src/com/unciv/ui/utils/ZoomableScrollPane.kt +++ b/core/src/com/unciv/ui/utils/ZoomableScrollPane.kt @@ -15,7 +15,7 @@ open class ZoomableScrollPane: ScrollPane(null) { } open fun zoom(zoomScale: Float) { - if (zoomScale < 0.5f || zoomScale > 2f) return + if (zoomScale < 0.25f || zoomScale > 2f) return setScale(zoomScale) } fun zoomIn() { diff --git a/core/src/com/unciv/ui/worldscreen/WorldMapHolder.kt b/core/src/com/unciv/ui/worldscreen/WorldMapHolder.kt index 929e779e09..d80e98f1c9 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldMapHolder.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldMapHolder.kt @@ -62,7 +62,7 @@ class WorldMapHolder(internal val worldScreen: WorldScreen, internal val tileMap internal fun addTiles() { val tileSetStrings = TileSetStrings() val daTileGroups = tileMap.values.map { WorldTileGroup(worldScreen, it, tileSetStrings) } - val tileGroupMap = TileGroupMap(daTileGroups, worldScreen.stage.width, worldScreen.stage.height, continuousScrollingX) + val tileGroupMap = TileGroupMap(daTileGroups, worldScreen.stage.width*2, worldScreen.stage.height*2, continuousScrollingX) val mirrorTileGroups = tileGroupMap.getMirrorTiles() for (tileGroup in daTileGroups) { @@ -130,7 +130,7 @@ class WorldMapHolder(internal val worldScreen: WorldScreen, internal val tileMap actor = tileGroupMap - setSize(worldScreen.stage.width * 2, worldScreen.stage.height * 2) + setSize(worldScreen.stage.width * 4, worldScreen.stage.height * 4) setOrigin(width / 2, height / 2) center(worldScreen.stage)