Pause settings page shows a stale SOUND label after pressing Mute

Aperta Adatta ai principianti
#105 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend, game-dev

Direzione di ricerca

Inizia da shared/pause.ts nel ramo mute, intorno alle righe 142-145, che chiama solo updateMuteText(), poi leggi refreshSettings(), intorno alle righe 233-246, per vedere quali delle cinque etichette ridisegna. La modifica probabile è chiamare anche this.refreshSettings() in quel ramo, e shared/settings.ts mostra da dove proviene lo stato di mute. È completato quando l'etichetta SOUND nella pagina delle impostazioni cambia non appena si preme Mute; verifica con npm test e aprendo il menu di pausa in un gioco in esecuzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug good first issue severity: low

Summary

With the pause menu's SETTINGS page open, pressing the Mute key or button changes the setting but the menu keeps showing the old SOUND ON / SOUND OFF label.

Where

  • shared/pause.ts:142-145 (the mute branch only calls updateMuteText())
  • shared/pause.ts:233-246 (refreshSettings() is only called from change() and showPage('settings'))

Details

if (all.some((c) => c.justPressed('mute'))) { setMuted(!isMuted()); this.updateMuteText(); }

The corner "MUTED (M)" text updates, but the settings labels are not redrawn.

Steps to reproduce

  1. Pause any game and choose SETTINGS.
  2. Press M. "MUTED (M)" appears in the corner while the menu still says SOUND ON.

Suggested fix

Call this.refreshSettings() in the mute branch as well (it only sets five labels). Alternatively, subscribe the controller to onSettingsChange and refresh whichever page is visible, which also covers changes made in another tab.

Acceptance criteria

  • The SOUND label matches the mute state immediately after pressing Mute on the settings page.

Getting started

  • Relevant files: shared/pause.ts, shared/settings.ts
  • How to run tests: npm test

Filed by repo-audit/full-audit at de2b25b. Severity: low. Effort: S. audit-key: bug|shared/pause.ts|mute-refresh

Lingua principale
TypeScript
Stelle
3
Fork
3
Merge medio
8h 13m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/GH-Arcade

Tutte le issue di TMHSDigital/GH-Arcade

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.