mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
3.11.6
This commit is contained in:
@ -30,7 +30,7 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
|
||||
|
||||
init {
|
||||
onBackButtonClicked { game.setWorldScreen() }
|
||||
val clicks = HashMap<String,() -> Unit>()
|
||||
val clicks = HashMap<String, () -> Unit>()
|
||||
|
||||
val setCityInfoButton = "Cities".toTextButton()
|
||||
val setCities = {
|
||||
@ -43,8 +43,8 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
|
||||
topTable.add(setCityInfoButton)
|
||||
|
||||
val setStatsInfoButton = "Stats".toTextButton()
|
||||
clicks["Stats"] = {setStats()}
|
||||
setStatsInfoButton.onClick{setStats()}
|
||||
clicks["Stats"] = { setStats() }
|
||||
setStatsInfoButton.onClick { setStats() }
|
||||
topTable.add(setStatsInfoButton)
|
||||
|
||||
val setCurrentTradesButton = "Trades".toTextButton()
|
||||
@ -60,7 +60,7 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
|
||||
val setUnitsButton = "Units".toTextButton()
|
||||
setUnitsButton.onClick {
|
||||
centerTable.clear()
|
||||
centerTable.add(ScrollPane(getUnitTable()).apply { setOverscroll(false,false) }).height(stage.height * 0.8f)
|
||||
centerTable.add(ScrollPane(getUnitTable()).apply { setOverscroll(false, false) }).height(stage.height * 0.8f)
|
||||
centerTable.pack()
|
||||
}
|
||||
topTable.add(setUnitsButton)
|
||||
@ -321,7 +321,7 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
|
||||
|
||||
|
||||
private fun getUnitTable(): Table {
|
||||
val table=Table(skin).apply { defaults().pad(5f) }
|
||||
val table = Table(skin).apply { defaults().pad(5f) }
|
||||
table.add("Name".tr())
|
||||
table.add("Action".tr())
|
||||
table.add(Fonts.strength.toString())
|
||||
@ -333,8 +333,8 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
|
||||
table.row()
|
||||
table.addSeparator()
|
||||
|
||||
for(unit in viewingPlayer.getCivUnits().sortedWith(compareBy({it.name},{!it.due},
|
||||
{it.currentMovement<0.1f},{abs(it.currentTile.position.x)+abs(it.currentTile.position.y)}))) {
|
||||
for (unit in viewingPlayer.getCivUnits().sortedWith(compareBy({ it.name }, { !it.due },
|
||||
{ it.currentMovement < 0.1f }, { abs(it.currentTile.position.x) + abs(it.currentTile.position.y) }))) {
|
||||
val baseUnit = unit.baseUnit()
|
||||
val button = unit.name.toTextButton()
|
||||
button.onClick {
|
||||
|
Reference in New Issue
Block a user