From 254d415968678f1f3001cd53c0b83dc049a78a7d Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 23 Nov 2018 14:48:05 +0200 Subject: [PATCH] Organized minimap UI --- core/src/com/unciv/ui/worldscreen/WorldScreen.kt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 076d4e0a1a..8ea022608d 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -47,8 +47,16 @@ class WorldScreen : CameraStageBaseScreen() { topBar.y - nextTurnButton.height - 10f) notificationsScroll = NotificationsScroll(this) notificationsScroll.width = stage.width/3 - minimap.setSize(stage.width/5,stage.height/5) - minimap.x = stage.width - minimap.width + + val externalMinimapWrapper = Table() + val internalMinimapWrapper = Table() + internalMinimapWrapper.add(minimap).size(stage.width/5,stage.height/5) + internalMinimapWrapper.background=ImageGetter.getBackground(Color.GRAY) + internalMinimapWrapper.pack() + externalMinimapWrapper.add(internalMinimapWrapper).pad(5f) + externalMinimapWrapper.background=ImageGetter.getBackground(Color.WHITE) + externalMinimapWrapper.pack() + externalMinimapWrapper.x = stage.width - externalMinimapWrapper.width tileMapHolder.addTiles() @@ -58,7 +66,7 @@ class WorldScreen : CameraStageBaseScreen() { } stage.addActor(tileMapHolder) - stage.addActor(minimap) + stage.addActor(externalMinimapWrapper) stage.addActor(topBar) stage.addActor(nextTurnButton) stage.addActor(techButton) @@ -134,7 +142,7 @@ class WorldScreen : CameraStageBaseScreen() { bottomBar.update(tileMapHolder.selectedTile) // has to come before tilemapholder update because the tilemapholder actions depend on the selected unit! minimap.update(cloneCivilization) - minimap.y = bottomBar.height + minimap.parent.parent.y = bottomBar.height // couldn't be bothered to create a separate val for minimap wrapper unitActionsTable.update(bottomBar.unitTable.selectedUnit) unitActionsTable.y = bottomBar.height