From 6124474b4fd78f679b6551bba11e68816db6968d Mon Sep 17 00:00:00 2001 From: Duan Tao Date: Fri, 21 Dec 2018 16:35:03 +0800 Subject: [PATCH 1/2] Mark defeated civs in diplomacy screen. --- core/src/com/unciv/ui/EmpireOverviewScreen.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/com/unciv/ui/EmpireOverviewScreen.kt b/core/src/com/unciv/ui/EmpireOverviewScreen.kt index 6b0abbcf0f..11bdda8dbc 100644 --- a/core/src/com/unciv/ui/EmpireOverviewScreen.kt +++ b/core/src/com/unciv/ui/EmpireOverviewScreen.kt @@ -294,11 +294,13 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ val label = Label(civ.civName.tr(), CameraStageBaseScreen.skin) - if(playerKnows(civ)) { + if (civ.isDefeated()) { + civGroup.background = civGroupBackground.tint(Color.LIGHT_GRAY) + label.setText(civ.civName + "(Fallen)") + } else if (playerKnows(civ)) { civGroup.background = civGroupBackground.tint(civ.getNation().getColor()) label.setFontColor(civ.getNation().getSecondaryColor()) - } - else { + } else { civGroup.background = civGroupBackground.tint(Color.DARK_GRAY) label.setText("???") } @@ -315,8 +317,8 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ } - for(civ in relevantCivs.filter { playerKnows(it) }) - for(diplomacy in civ.diplomacy.values.filter { !it.otherCiv().isBarbarianCivilization() && playerKnows(it.otherCiv()) }){ + for(civ in relevantCivs.filter { playerKnows(it) && !it.isDefeated() }) + for(diplomacy in civ.diplomacy.values.filter { !it.otherCiv().isBarbarianCivilization() && playerKnows(it.otherCiv()) && !it.otherCiv().isDefeated()}){ val civGroup = civGroups[civ]!! val otherCivGroup = civGroups[diplomacy.otherCiv()]!! From b4fa88cada30f307c0bffef1af3c5c5ca38e170d Mon Sep 17 00:00:00 2001 From: Duan Tao Date: Fri, 21 Dec 2018 16:41:48 +0800 Subject: [PATCH 2/2] Remove extra word to prevent the label from being too long. --- core/src/com/unciv/ui/EmpireOverviewScreen.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/com/unciv/ui/EmpireOverviewScreen.kt b/core/src/com/unciv/ui/EmpireOverviewScreen.kt index 11bdda8dbc..2e7f735cb0 100644 --- a/core/src/com/unciv/ui/EmpireOverviewScreen.kt +++ b/core/src/com/unciv/ui/EmpireOverviewScreen.kt @@ -296,7 +296,6 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ if (civ.isDefeated()) { civGroup.background = civGroupBackground.tint(Color.LIGHT_GRAY) - label.setText(civ.civName + "(Fallen)") } else if (playerKnows(civ)) { civGroup.background = civGroupBackground.tint(civ.getNation().getColor()) label.setFontColor(civ.getNation().getSecondaryColor())