diff --git a/android/Images/NationIcons/America.png b/android/Images/NationIcons/America.png index 5b39ce5f44..1b76be26a4 100644 Binary files a/android/Images/NationIcons/America.png and b/android/Images/NationIcons/America.png differ diff --git a/android/assets/game.png b/android/assets/game.png index 4625024f43..31a3bad2fe 100644 Binary files a/android/assets/game.png and b/android/assets/game.png differ diff --git a/core/src/com/unciv/ui/EmpireOverviewScreen.kt b/core/src/com/unciv/ui/EmpireOverviewScreen.kt index a8985b9424..e36a533338 100644 --- a/core/src/com/unciv/ui/EmpireOverviewScreen.kt +++ b/core/src/com/unciv/ui/EmpireOverviewScreen.kt @@ -311,27 +311,8 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ val civGroups = HashMap() for(i in 0..relevantCivs.lastIndex){ val civ = relevantCivs[i] - val civGroup = Table() - val civGroupBackground = ImageGetter.getDrawable("OtherIcons/civTableBackground.png") - var civNameText = civ.civName.tr() - if(civ.isDefeated()) civNameText += "\n({Defeated})".tr() - val label = civNameText.toLabel() - label.setAlignment(Align.center) - - if (civ.isDefeated()) { - civGroup.background = civGroupBackground.tint(Color.LIGHT_GRAY) - label.setFontColor(Color.BLACK) - } else if (playerKnows(civ)) { - civGroup.background = civGroupBackground.tint(civ.getNation().getColor()) - label.setFontColor(civ.getNation().getSecondaryColor()) - } else { - civGroup.background = civGroupBackground.tint(Color.DARK_GRAY) - label.setText("???") - } - - civGroup.add(label).pad(10f) - civGroup.pack() + val civGroup = getCivGroup(civ, "", currentPlayerCivInfo) val vector = HexMath().getVectorForAngle(2 * Math.PI.toFloat() *i / relevantCivs.size) civGroup.center(group) @@ -394,4 +375,32 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ return resourcesTable } + + companion object { + fun getCivGroup(civ: CivilizationInfo, afterCivNameText:String,currentPlayer:CivilizationInfo): Table { + val civGroup = Table() + val civGroupBackground = ImageGetter.getDrawable("OtherIcons/civTableBackground.png") + + val civNameText = civ.civName.tr()+afterCivNameText + val label = civNameText.toLabel() + label.setAlignment(Align.center) + + if (civ.isDefeated()) { + civGroup.background = civGroupBackground.tint(Color.LIGHT_GRAY) + civGroup.add(ImageGetter.getImage("OtherIcons/DisbandUnit")).size(30f) + label.setFontColor(Color.BLACK) + } else if (currentPlayer==civ || currentPlayer.knows(civ)) { + civGroup.background = civGroupBackground.tint(civ.getNation().getColor()) + label.setFontColor(civ.getNation().getSecondaryColor()) + } else { + civGroup.background = civGroupBackground.tint(Color.DARK_GRAY) + label.setText("???") + } + + civGroup.add(ImageGetter.getNationIndicator(civ.getNation(), 30f)) + civGroup.add(label).pad(10f) + civGroup.pack() + return civGroup + } + } } \ No newline at end of file diff --git a/core/src/com/unciv/ui/VictoryScreen.kt b/core/src/com/unciv/ui/VictoryScreen.kt index 3f11bf0573..6054526a78 100644 --- a/core/src/com/unciv/ui/VictoryScreen.kt +++ b/core/src/com/unciv/ui/VictoryScreen.kt @@ -167,13 +167,12 @@ class VictoryScreen : PickerScreen() { dominationVictoryColumn.add("Undefeated civs".toLabel()).row() dominationVictoryColumn.addSeparator() - for (civ in majorCivs.filter { !it.isDefeated() }) { - val civName = if(playerCivInfo.knows(civ) || playerCivInfo==civ) civ.civName.tr() else "???" - dominationVictoryColumn.add(TextButton(civName, skin).apply { color = Color.GREEN }).row() - } + for (civ in majorCivs.filter { !it.isDefeated() }) + dominationVictoryColumn.add(EmpireOverviewScreen.getCivGroup(civ, "", playerCivInfo)).row() for (civ in majorCivs.filter { it.isDefeated() }) - dominationVictoryColumn.add(TextButton(civ.civName.tr(), skin).apply { color = Color.GRAY }).row() + dominationVictoryColumn.add(EmpireOverviewScreen.getCivGroup(civ, "", playerCivInfo)).row() + return dominationVictoryColumn } @@ -189,8 +188,7 @@ class VictoryScreen : PickerScreen() { .sortedByDescending { it.branchesCompleted } for (entry in civsToBranchesCompleted) { - val civName = if(playerCivInfo.knows(entry.civ) || playerCivInfo==entry.civ) entry.civ.civName.tr() else "???" - policyVictoryColumn.add(TextButton(civName + " - " + entry.branchesCompleted, skin)).row() + policyVictoryColumn.add(EmpireOverviewScreen.getCivGroup(entry.civ, " - " + entry.branchesCompleted, playerCivInfo)).row() } return policyVictoryColumn } @@ -208,8 +206,7 @@ class VictoryScreen : PickerScreen() { } for (entry in civsToPartsRemaining) { - val civName = if(playerCivInfo.knows(entry.civ) || playerCivInfo==entry.civ) entry.civ.civName.tr() else "???" - scientificVictoryColumn.add(TextButton(civName + " - " + entry.partsRemaining, skin)).row() + scientificVictoryColumn.add(EmpireOverviewScreen.getCivGroup(entry.civ, " - " + entry.partsRemaining, playerCivInfo)).row() } return scientificVictoryColumn }