fix: change pause key from Space to P, disable pause during QTE
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user