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"
|
||||
|
||||
Reference in New Issue
Block a user