Added Show Minimap setting option

This commit is contained in:
Yair Morgenstern 2019-09-05 23:20:16 +03:00
parent 17b3069668
commit 587c76b1f8
3 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,7 @@ class GameSettings {
var tileSet:String = "FantasyHex" var tileSet:String = "FantasyHex"
var showTutorials: Boolean = true var showTutorials: Boolean = true
var autoAssignCityProduction: Boolean = true var autoAssignCityProduction: Boolean = true
var showMinimap: Boolean = true
var userName:String="" var userName:String=""
var userId = "" var userId = ""

View File

@ -137,5 +137,8 @@ class MinimapHolder(tileMapHolder: TileMapHolder): Table(){
return toggleIconTable return toggleIconTable
} }
fun update(civInfo:CivilizationInfo){minimap.update(civInfo)} fun update(civInfo:CivilizationInfo){
isVisible = UnCivGame.Current.settings.showMinimap
minimap.update(civInfo)
}
} }

View File

@ -80,6 +80,12 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
update() update()
} }
innerTable.add("Show minimap".toLabel())
innerTable.addButton(if(settings.showMinimap) "Yes".tr() else "No".tr()) {
settings.showMinimap= !settings.showMinimap
update()
}
addLanguageSelectBox(innerTable) addLanguageSelectBox(innerTable)
addFontSelectBox(innerTable) addFontSelectBox(innerTable)