mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
Resolve #4811 - Allow mass unit upgrades from the unit overview screen
This commit is contained in:
parent
1532216335
commit
6f5edbae0c
@ -151,6 +151,7 @@ class UnitOverviewTab(
|
||||
}
|
||||
|
||||
private fun Table.updateUnitListTable(): Table {
|
||||
clear()
|
||||
val game = overviewScreen.game
|
||||
defaults().pad(5f)
|
||||
|
||||
@ -225,9 +226,9 @@ class UnitOverviewTab(
|
||||
val upgradeIcon = ImageGetter.getUnitIcon(unit.getUnitToUpgradeTo().name,
|
||||
if (enable) Color.GREEN else Color.GREEN.darken(0.5f))
|
||||
if (enable) upgradeIcon.onClick {
|
||||
showWorldScreenAt(unit)
|
||||
SoundPlayer.play(unitAction!!.uncivSound)
|
||||
unitAction.action!!()
|
||||
unitListTable.updateUnitListTable()
|
||||
}
|
||||
add(upgradeIcon).size(28f)
|
||||
} else add()
|
||||
|
Loading…
x
Reference in New Issue
Block a user