DEADSOFTWARE

Fix touch enywhere
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / input / handler / mouse / CloseGameWindowMouseInputHandler.kt
index 2929c4297d793acbeb310fdf5ac31d1f93ee22e5..1f76039c78fe1575c5fcf6c878e1f69d68cfb30d 100644 (file)
@@ -21,7 +21,7 @@ class CloseGameWindowMouseInputHandler @Inject constructor(
 
     override fun checkConditions(action: MouseInputAction): Boolean {
         return gameWindowsManager.getCurrentWindow() != GameUiWindow.NONE &&
-                action.actionKey is MouseInputActionKey.Left &&
+                (action.actionKey is MouseInputActionKey.Left || action.actionKey is MouseInputActionKey.Touch) &&
                 !action.actionKey.touchUp &&
                 !isInsideWindow(action, getCurrentWindowTexture())
     }