diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActionsTable.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActionsTable.kt index 390bb1c64a..62c75bc8ef 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActionsTable.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActionsTable.kt @@ -16,16 +16,6 @@ import com.unciv.ui.utils.* import com.unciv.ui.worldscreen.WorldScreen private data class UnitIconAndKey (val Icon: Actor, val key: Char = 0.toChar()) -class UnitActionButtonOnHoverListener(private val item: Actor, private val keyLabel: Label) : ClickListener() { - override fun enter(event: InputEvent, x: Float, y: Float, pointer: Int, fromActor: Actor?) { - super.enter(event, x, y, pointer, fromActor) - keyLabel.isVisible = true - } - override fun exit(event: InputEvent, x: Float, y: Float, pointer: Int, toActor: Actor?) { - super.exit(event, x, y, pointer, toActor) - keyLabel.isVisible = false - } -} class UnitActionsTable(val worldScreen: WorldScreen) : Table(){ @@ -89,9 +79,8 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table(){ val fontColor = if(unitAction.isCurrentAction) Color.YELLOW else Color.WHITE actionButton.add(unitAction.title.toLabel(fontColor)).pad(5f) if (iconAndKey.key != 0.toChar()) { - val keyLabel = "(${iconAndKey.key.toUpperCase()})".toLabel(Color.WHITE).apply { isVisible = false } + val keyLabel = "(${iconAndKey.key.toUpperCase()})".toLabel(Color.WHITE) actionButton.add(keyLabel) - actionButton.addListener(UnitActionButtonOnHoverListener(actionButton, keyLabel)) } actionButton.pack() val action = {