diff --git a/core/src/com/unciv/models/metadata/GameSettings.kt b/core/src/com/unciv/models/metadata/GameSettings.kt index f85393ac7f..16cefafd5c 100644 --- a/core/src/com/unciv/models/metadata/GameSettings.kt +++ b/core/src/com/unciv/models/metadata/GameSettings.kt @@ -17,6 +17,7 @@ class GameSettings { var tileSet:String = "FantasyHex" var showTutorials: Boolean = true var autoAssignCityProduction: Boolean = true + var showMinimap: Boolean = true var userName:String="" var userId = "" diff --git a/core/src/com/unciv/ui/worldscreen/Minimap.kt b/core/src/com/unciv/ui/worldscreen/Minimap.kt index 8166e37099..d3e0825a14 100644 --- a/core/src/com/unciv/ui/worldscreen/Minimap.kt +++ b/core/src/com/unciv/ui/worldscreen/Minimap.kt @@ -137,5 +137,8 @@ class MinimapHolder(tileMapHolder: TileMapHolder): Table(){ return toggleIconTable } - fun update(civInfo:CivilizationInfo){minimap.update(civInfo)} + fun update(civInfo:CivilizationInfo){ + isVisible = UnCivGame.Current.settings.showMinimap + minimap.update(civInfo) + } } \ No newline at end of file diff --git a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt index 8c9f51fc16..c5bc155c8b 100644 --- a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt +++ b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt @@ -80,6 +80,12 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr update() } + innerTable.add("Show minimap".toLabel()) + innerTable.addButton(if(settings.showMinimap) "Yes".tr() else "No".tr()) { + settings.showMinimap= !settings.showMinimap + update() + } + addLanguageSelectBox(innerTable) addFontSelectBox(innerTable)