diff --git a/www/html/Game/public/js/play.js b/www/html/Game/public/js/play.js index 76e12d7..469ae97 100644 --- a/www/html/Game/public/js/play.js +++ b/www/html/Game/public/js/play.js @@ -755,16 +755,27 @@ const p = document.getElementById('quiz-carry-embed-q-strip-text'); if (!wrap || !p) return; if (!(previewMode && editorEmbedReturn && isQuizCarry())) { + wrap.classList.remove('quiz-carry-embed-q-strip--countdown'); wrap.classList.add('is-hidden'); wrap.setAttribute('aria-hidden', 'true'); return; } - if (isQuizCarryEmbedCountdownBlockingMovement()) { + const blocking = isQuizCarryEmbedCountdownBlockingMovement(); + const pending = quizCarryEmbedPendingQuestion; + let t = ''; + if (blocking && pending) { + t = formatQuizCarryQuestionHud(pending); + if (t) wrap.classList.add('quiz-carry-embed-q-strip--countdown'); + else wrap.classList.remove('quiz-carry-embed-q-strip--countdown'); + } else if (blocking) { + wrap.classList.remove('quiz-carry-embed-q-strip--countdown'); wrap.classList.add('is-hidden'); wrap.setAttribute('aria-hidden', 'true'); return; + } else { + wrap.classList.remove('quiz-carry-embed-q-strip--countdown'); + t = (playQuizText || '').trim(); } - const t = (playQuizText || '').trim(); if (!t) { wrap.classList.add('is-hidden'); wrap.setAttribute('aria-hidden', 'true'); @@ -1893,6 +1904,7 @@ if (!o) return; o.botQuizCarryPathfindAfter = 0; }); + syncQuizCarryEmbedQuestionStrip(); return; } const elapsed = now - quizCarryEmbedCountdownStartAt; @@ -1902,6 +1914,7 @@ ov.classList.remove('is-hidden'); ov.setAttribute('aria-hidden', 'false'); } + syncQuizCarryEmbedQuestionStrip(); } function quizCarryPickNextQuestion() { @@ -1938,6 +1951,7 @@ const phaseEl = document.getElementById('quiz-game-phase-label'); if (phaseEl) phaseEl.textContent = 'รอเริ่มคำถาม — นับถอยหลัง 3 · 2 · 1'; tickQuizCarryEmbedCountdown(); + syncQuizCarryEmbedQuestionStrip(); return; } quizCarryCurrent = q; diff --git a/www/html/Game/public/play.html b/www/html/Game/public/play.html index 17a9390..26fd08b 100644 --- a/www/html/Game/public/play.html +++ b/www/html/Game/public/play.html @@ -145,6 +145,11 @@ max-height: 22vh; overflow: auto; } + /* อยู่เหนือ overlay นับถอยหลัง (10080) เพื่อให้อ่านคำถามระหว่าง 3–2–1 */ + #quiz-carry-embed-q-strip.quiz-carry-embed-q-strip--countdown { + z-index: 10082; + bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px)); + } #play-quiz-scoreboard { position: fixed; top: max(56px, env(safe-area-inset-top)); @@ -719,7 +724,7 @@ - +