feat(stage-tamagotchi): do not ignore mouse events when fade on hover not enabled

This commit is contained in:
Neko Ayaka
2025-12-01 02:14:07 +08:00
parent 144a77d8d8
commit 28406c3586
@@ -85,11 +85,12 @@ watch([isOutsideFor250Ms, isAroundWindowBorderFor250Ms, isOutsideWindow, isTrans
pause()
}
else {
const fadeEnabled = fadeOnHoverEnabled.value
// Otherwise allow click-through while we fade UI based on transparency (when enabled)
isIgnoringMouseEvents.value = true
shouldFadeOnCursorWithin.value = fadeOnHoverEnabled.value && !isOutsideWindow.value && !isTransparent.value
setIgnoreMouseEvents([true, { forward: true }])
if (fadeOnHoverEnabled.value)
isIgnoringMouseEvents.value = fadeEnabled
shouldFadeOnCursorWithin.value = fadeEnabled && !isOutsideWindow.value && !isTransparent.value
setIgnoreMouseEvents([fadeEnabled, { forward: true }])
if (fadeEnabled)
resume()
else
pause()