The size of minimap will change with resolution changing. (#1922)

This commit is contained in:
lishaoxia1985
2020-02-13 15:20:04 +08:00
committed by GitHub
parent 3bfb2a29b7
commit b6e2b72b5c

View File

@ -40,7 +40,7 @@ class Minimap(val mapHolder: WorldMapHolder) : ScrollPane(null){
val hex = ImageGetter.getImage("OtherIcons/Hexagon")
val positionalVector = HexMath.hex2WorldCoords(tileInfo.position)
val groupSize = mapHolder.worldScreen.stage.height / 8f / mapHolder.tileMap.mapParameters.size.radius
val groupSize = mapHolder.worldScreen.stage.height / 8f / mapHolder.tileMap.mapParameters.size.radius * (mapHolder.worldScreen.stage.height / 600f)
hex.setSize(groupSize,groupSize)
hex.setPosition(positionalVector.x * 0.5f * groupSize,
positionalVector.y * 0.5f * groupSize)