2 Commits

Author SHA1 Message Date
Yue-bin
692fc25d42 fix(Gui): 修改静音按钮逻辑
- 移除主机玩家的条件限制,仅保留本地玩家检查
- 将"禁音"/"取消禁音"文本改为更标准的"静音"/"取消静音"
2026-05-08 17:42:15 +08:00
Yue-bin
bec55e4ecc fix(PlayerManagerGUI): 修复玩家管理界面中空元素导致的布局错乱问题
当widget不应该绘制时,之前会跳过列位置更新导致后续元素对齐错误,
现在添加了占位推进列位置以确保布局的一致性。
2026-05-08 17:23:16 +08:00
2 changed files with 4 additions and 4 deletions

View File

@@ -9,11 +9,9 @@ public static class MuteButton
return new PlayerRowButtonWidget return new PlayerRowButtonWidget
{ {
Name = "mute", Name = "mute",
Condition = player => Condition = player => !PlayerManager.IsLocalPlayer(player),
!PlayerManager.IsHost(player)
&& !PlayerManager.IsLocalPlayer(player),
GetText = player => GetText = player =>
PlayerManager.IsMuted(player) ? "取消音" : "音", PlayerManager.IsMuted(player) ? "取消音" : "音",
OnClick = player => OnClick = player =>
{ {
if (PlayerManager.IsMuted(player)) if (PlayerManager.IsMuted(player))

View File

@@ -99,6 +99,8 @@ public static class PlayerManagerGUI
{ {
if (widget.ShouldDraw(member)) if (widget.ShouldDraw(member))
widget.Draw(Cursor.NextColumn(widget.Width, 40f), member); widget.Draw(Cursor.NextColumn(widget.Width, 40f), member);
else
Cursor.NextColumn(widget.Width, 40f); // 占位推进列位置
} }
Cursor.EndRow(); Cursor.EndRow();
} }