DEADSOFTWARE

Fix touch controls
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / input / handler / mouse / SelectCreativeInventoryItemMouseInputHandler.kt
index ddd71c4418cbae9603214f0c8985b84083564f13..e6fb732c2fb118e83ab118a548e76edcf7b8c50e 100644 (file)
@@ -25,7 +25,7 @@ class SelectCreativeInventoryItemMouseInputHandler @Inject constructor(
     override fun checkConditions(action: MouseInputAction): Boolean {
         return gameWindowsManager.getCurrentWindow() == GameUiWindow.CREATIVE_INVENTORY &&
                 !gameWindowsManager.isDragging &&
-                action.actionKey is MouseInputActionKey.Left &&
+                (action.actionKey is MouseInputActionKey.Left || action.actionKey is MouseInputActionKey.Touch) &&
                 action.actionKey.touchUp && isInsideWindow(action, creativeInventoryTexture)
     }