From c1d196d38c12b565d9e44cf2817cb4d408002a28 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 22 Jun 2018 00:53:24 +0300 Subject: [PATCH] Menu no longer appears multiple times on top of itself if you click the menu button several times in a row --- core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt index 0a168c6a06..0023ed1f13 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt @@ -84,7 +84,8 @@ class WorldScreenTopBar(val screen: WorldScreen) : Table() { .apply { setSize(50f, 50f) } menuButton.color = Color.WHITE menuButton.addClickListener { - screen.stage.addActor(WorldScreenOptionsTable()) + if(screen.stage.actors.none { it is WorldScreenOptionsTable }) + screen.stage.addActor(WorldScreenOptionsTable()) } menuButton.centerY(this) menuButton.x = menuButton.y