From 580275ff64a622f5d66eca83124f575b98b490d2 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Wed, 17 Nov 2021 12:41:36 +0900 Subject: [PATCH] keylayout config keycaps to not respond to the mouseup --- .../terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt b/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt index c5bb24989..a305d41bd 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UIKeyboardInputConfig.kt @@ -260,7 +260,7 @@ private class UIItemInputKeycap( private val keycapFill = Toolkit.Theme.COL_CELL_FILL - private val keylabelCol = Toolkit.Theme.COL_DISABLED + private val keylabelCol = Color(0xddddddff.toInt()) private val configuredKeyCol = Color.WHITE override fun update(delta: Float) { @@ -280,12 +280,8 @@ private class UIItemInputKeycap( batch.color = if (key == null) borderKeyForbidden - else if (Gdx.input.isKeyPressed(key) && selected) - borderKeyPressedAndSelected - else if (Gdx.input.isKeyPressed(key) || selected) + else if (Gdx.input.isKeyPressed(key)) borderKeyPressed - else if (mouseUp) - borderMouseUp else borderKeyNormal