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 <spellman23@gmail.com>
This commit is contained in:
itanasi 2022-03-17 13:25:24 -07:00 committed by GitHub
parent 89e73ad7c5
commit f884f30226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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() {

View File

@ -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)