From 9da66c8c0892710572d28a94f716c7c523f02a0c Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 6 Feb 2022 19:58:22 +0200 Subject: [PATCH] Notification icons are now on the RIGHT so you can scroll notifications and find interesting ones faster --- core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt b/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt index 1a3436df73..27c499dbf5 100644 --- a/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt +++ b/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt @@ -35,10 +35,14 @@ class NotificationsScroll(internal val worldScreen: WorldScreen) : ScrollPane(nu val label = notification.text.toLabel(Color.BLACK, 30) val listItem = Table() + listItem.background = ImageGetter.getRoundedEdgeRectangle() + listItem.add(label) + + val iconSize = 30f if (notification.icons.isNotEmpty()) { val ruleset = worldScreen.gameInfo.ruleSet - for (icon in notification.icons) { + for (icon in notification.icons.reversed()) { val image: Actor = when { ruleset.technologies.containsKey(icon) -> ImageGetter.getTechIcon(icon) ruleset.nations.containsKey(icon) -> ImageGetter.getNationIndicator(ruleset.nations[icon]!!, iconSize) @@ -48,8 +52,6 @@ class NotificationsScroll(internal val worldScreen: WorldScreen) : ScrollPane(nu listItem.add(image).size(iconSize).padRight(5f) } } - listItem.background = ImageGetter.getRoundedEdgeRectangle() - listItem.add(label) // using a large click area with no gap in between each message item. // this avoids accidentally clicking in between the messages, resulting in a map click