feat(ui): add sender name display options

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-22 17:20:51 +02:00
co-authored by Claude Sonnet 4.6
parent ba4cd918da
commit c652b102fc
6 changed files with 243 additions and 0 deletions
+8
View File
@@ -3076,6 +3076,14 @@ public sealed class ChatLogWindow : Window
float lineWidth = 0f
)
{
// UI-7: render a copy with the sender name reformatted per the user's
// display options. Skipped in screenshot mode so the name-anonymising
// path in DrawChunk stays reliable (privacy wins). ForDisplay returns
// the list unchanged when nothing applies, so non-sender lists and the
// neutral default cost only a quick scan.
if (!ScreenshotMode)
chunks = SenderNameDisplay.ForDisplay(chunks);
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, Vector2.Zero);
for (var i = 0; i < chunks.Count; i++)
+37
View File
@@ -157,6 +157,43 @@ internal sealed class Chat : ISettingsTab
ref Mutable.NotifyPluginDisclosure
);
ImGuiUtil.HelpMarker(HellionStrings.Settings_Chat_NotifyPluginDisclosure_Description);
// UI-7: name display options.
using (
var combo = ImGuiUtil.BeginComboVertical(
HellionStrings.Settings_Chat_WorldSuffix_Name,
Mutable.WorldSuffixMode.Name()
)
)
{
if (combo.Success)
{
foreach (var mode in Enum.GetValues<WorldSuffixMode>())
{
if (ImGui.Selectable(mode.Name(), Mutable.WorldSuffixMode == mode))
Mutable.WorldSuffixMode = mode;
}
}
}
ImGuiUtil.HelpMarker(HellionStrings.Settings_Chat_WorldSuffix_Description);
using (
var combo = ImGuiUtil.BeginComboVertical(
HellionStrings.Settings_Chat_NameForm_Name,
Mutable.NameFormMode.Name()
)
)
{
if (combo.Success)
{
foreach (var mode in Enum.GetValues<NameFormMode>())
{
if (ImGui.Selectable(mode.Name(), Mutable.NameFormMode == mode))
Mutable.NameFormMode = mode;
}
}
}
ImGuiUtil.HelpMarker(HellionStrings.Settings_Chat_NameForm_Description);
}
}