From 210011fb15f98bee54d103cf37aadc8553889a81 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 7 Jul 2020 23:05:27 +0300 Subject: [PATCH] Resolved #2640 - Difficulty level shown in victory status screen --- core/src/com/unciv/Constants.kt | 4 ++-- core/src/com/unciv/ui/mapeditor/TileEditorOptionsTable.kt | 3 +-- core/src/com/unciv/ui/victoryscreen/VictoryScreen.kt | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/src/com/unciv/Constants.kt b/core/src/com/unciv/Constants.kt index ff4b41976a..f198f4ac80 100644 --- a/core/src/com/unciv/Constants.kt +++ b/core/src/com/unciv/Constants.kt @@ -62,8 +62,8 @@ object Constants { const val tutorialPopupNamePrefix = "Tutorial: " const val close = "Close" - const val disabled="disabled" - const val enabled="enabled" + const val disabled = "disabled" + const val enabled = "enabled" const val scienceConversionEffect = "Production to science conversion in cities increased by 33%" diff --git a/core/src/com/unciv/ui/mapeditor/TileEditorOptionsTable.kt b/core/src/com/unciv/ui/mapeditor/TileEditorOptionsTable.kt index 3c5b68cce2..7181758b49 100644 --- a/core/src/com/unciv/ui/mapeditor/TileEditorOptionsTable.kt +++ b/core/src/com/unciv/ui/mapeditor/TileEditorOptionsTable.kt @@ -537,8 +537,7 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera // Allow barbarian camps, ruins and similar without clear -> if (topTerrain.unbuildable && improvement.isGreatImprovement()) tileInfo.terrainFeature = null - topTerrain.unbuildable - -> tileInfo.improvement = null // forbid on unbuildable feature + topTerrain.unbuildable -> tileInfo.improvement = null // forbid on unbuildable feature "Can only be built on Coastal tiles" in improvement.uniques && tileInfo.isCoastalTile() -> Unit // allow Moai where appropriate else -> tileInfo.improvement = null diff --git a/core/src/com/unciv/ui/victoryscreen/VictoryScreen.kt b/core/src/com/unciv/ui/victoryscreen/VictoryScreen.kt index 3195ae4c51..c64ab3467c 100644 --- a/core/src/com/unciv/ui/victoryscreen/VictoryScreen.kt +++ b/core/src/com/unciv/ui/victoryscreen/VictoryScreen.kt @@ -3,6 +3,7 @@ package com.unciv.ui.victoryscreen import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextButton +import com.badlogic.gdx.utils.Align import com.unciv.logic.civilization.CivilizationInfo import com.unciv.models.ruleset.VictoryType import com.unciv.models.translations.tr @@ -25,6 +26,10 @@ class VictoryScreen(val worldScreen: WorldScreen) : PickerScreen() { private val contentsTable = Table() init { + val difficultyLabel = ("{Difficulty}: {${worldScreen.gameInfo.difficulty}}").toLabel() + difficultyLabel.setPosition(10f, stage.height-10, Align.topLeft) + stage.addActor(difficultyLabel) + val tabsTable = Table().apply { defaults().pad(10f) } val setMyVictoryButton = "Our status".toTextButton().onClick { setMyVictoryTable() } tabsTable.add(setMyVictoryButton)