From 13ff4843c0fe03aa7a6a2efc793a89e3f221243d Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 5 Dec 2018 10:30:50 +0200 Subject: [PATCH] Civilopeida entries sorted alphabetically --- core/src/com/unciv/ui/CivilopediaScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/CivilopediaScreen.kt b/core/src/com/unciv/ui/CivilopediaScreen.kt index d27a274a..8252fa62 100644 --- a/core/src/com/unciv/ui/CivilopediaScreen.kt +++ b/core/src/com/unciv/ui/CivilopediaScreen.kt @@ -62,7 +62,8 @@ class CivilopediaScreen : CameraStageBaseScreen() { buttons.add(button) val buttonClicked = { val newArray = Array() - 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.selected = nameList.items.get(0) label.setText(nameList.selected.description)