DEADSOFTWARE

Fix crash in craft
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / input / handler / mouse / CreativeInventoryScrollMouseInputHandler.kt
index 352d04bcb5fba0e98d439af2da68edcc5e4f0a0c..11f76e9a691fd8a34c2086fdc21c4023ab592481 100644 (file)
@@ -34,12 +34,12 @@ class CreativeInventoryScrollMouseInputHandler @Inject constructor(
     }
 
     private fun checkStartDragConditions(action: MouseInputAction): Boolean {
-        return (action.actionKey is MouseInputActionKey.Touch) &&
+        return (action.actionKey is MouseInputActionKey.Screen) &&
                 !action.actionKey.touchUp && !gameWindowsManager.isDragging
     }
 
     private fun checkEndDragConditions(action: MouseInputAction): Boolean {
-        return action.actionKey is MouseInputActionKey.Touch &&
+        return action.actionKey is MouseInputActionKey.Screen &&
                 action.actionKey.touchUp && gameWindowsManager.isDragging
     }
 
@@ -75,7 +75,7 @@ class CreativeInventoryScrollMouseInputHandler @Inject constructor(
 
     override fun handle(action: MouseInputAction) {
         when (action.actionKey) {
-            is MouseInputActionKey.Touch -> handleStartOrEndDrag(action)
+            is MouseInputActionKey.Screen -> handleStartOrEndDrag(action)
             is MouseInputActionKey.Dragged -> handleDrag(action)
             is MouseInputActionKey.Scroll -> handleScroll(action)
             else -> return