mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-03 00:45:19 -04:00
Civilopeida entries sorted alphabetically
This commit is contained in:
parent
93646cd74b
commit
13ff4843c0
@ -62,7 +62,8 @@ class CivilopediaScreen : CameraStageBaseScreen() {
|
|||||||
buttons.add(button)
|
buttons.add(button)
|
||||||
val buttonClicked = {
|
val buttonClicked = {
|
||||||
val newArray = Array<ICivilopedia>()
|
val newArray = Array<ICivilopedia>()
|
||||||
for (civilopediaEntry in map[str]!!) newArray.add(civilopediaEntry)
|
for (civilopediaEntry in map[str]!!.sortedBy { it.toString() }) // Alphabetical order
|
||||||
|
newArray.add(civilopediaEntry)
|
||||||
nameList.setItems(newArray)
|
nameList.setItems(newArray)
|
||||||
nameList.selected = nameList.items.get(0)
|
nameList.selected = nameList.items.get(0)
|
||||||
label.setText(nameList.selected.description)
|
label.setText(nameList.selected.description)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user