Pause settings page shows a stale SOUND label after pressing Mute

未关闭 适合新手
#105 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend, game-dev

调研方向

从 shared/pause.ts 中 mute 分支(约第 142-145 行)开始,该分支只调用了 updateMuteText()。然后阅读 refreshSettings()(约第 233-246 行),看它会重绘哪五个标签。可能的修改是在该分支中也调用 this.refreshSettings(),shared/settings.ts 则说明静音状态的来源。当按下 Mute 时设置页面上的 SOUND 标签立即切换,即为完成。使用 npm test 检查,并在运行中的游戏里打开暂停菜单进行验证。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
3
派生
3
平均合并
8 小时 13 分钟
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/GH-Arcade 的其他 Issue

查看 TMHSDigital/GH-Arcade 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。