fix: change pause key from Space to P, disable pause during QTE

This commit is contained in:
2026-06-09 19:46:51 +08:00
parent c9d29019a0
commit 3185dc5819
2 changed files with 3 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ watch(() => store.currentScene?.id, async (newId) => {
function onGlobalKeydown(e: KeyboardEvent) {
const key = e.key
if (key === ' ' && store.pauseEnabled && started.value && !store.gameEnded) {
if (key === 'p' && !store.qteActive && store.pauseEnabled && started.value && !store.gameEnded) {
const activeEl = document.activeElement
if (!activeEl || activeEl.tagName === 'BODY' || activeEl === document.body) {
e.preventDefault()
@@ -289,7 +289,7 @@ init()
/>
<div v-if="paused" class="pause-overlay" @click="togglePause">
<div class="pause-text">已暂停</div>
<div class="pause-hint">点击或按 Space 继续</div>
<div class="pause-hint">点击或按 P 继续</div>
</div>
<AchievementToast
:achievement-id="store.toastAchievementId"

View File

@@ -57,7 +57,7 @@ const bgAlphaOptions = [0, 0.3, 0.5, 0.7, 0.9]
</div>
<div class="setting-row">
<span class="setting-label">可暂停 (Space)</span>
<span class="setting-label">可暂停 (P)</span>
<label class="toggle">
<input type="checkbox" :checked="store.pauseEnabled" @change="store.setPauseEnabled(($event.target as HTMLInputElement).checked)" />
<span class="toggle-slider"></span>