refactor(ui): retire ChatLogWindow and the v1.5.6 chat-window layer
The legacy ChatLogWindow.cs and its tightly coupled neighbours are gone: PayloadHandler, Popout, ChatInputBar, AutoCompleteInfo, AutoTellTabTint, the three tab-icon helpers, the old Ui/StatusBar and Ui/SymbolPicker behind the components-layer replacements, HellionStyle + helpers, the CompactInputSubmitter test mirror and the QuickPickerSelfTestStep. The new component layer (MainWindow + the five components + GlobalStyleScope) now drives the whole chat surface. InputPreview, CommandHelpWindow and Debugger lose their ChatLogWindow backref. The first two are skeleton windows for now — DrawConditions always returns false until the new chat layer exposes equivalent state. Debugger keeps the current-tab and vanilla-chat blocks; the payload counters are explicitly marked offline. DbViewer renders Sender/Content columns as plain TextValue strings instead of the removed DrawChunks. GameFunctions.Chat and GameFunctions.KeybindManager keep the hook plumbing intact but mark every ChatLogWindow.Activated / ChangeTabDelta / TellSpecial site as offline so the FFXIV-side integration still compiles and runs without an Activated entry point. TypingIpc.BuildState reports the IPC state as not-typing / not-focused until the new chat layer surfaces real focus and buffer state again. Plugin.cs Draw uses StyleEngine.GlobalStyleScope.Push for the per-frame theme push and stops calling BeginFrame / FinalizeFrame / HideStateCheck / DefaultText through the dead window. ImGuiUtil drops PostPayload + WrapText + the surrounding word-wrap pipeline. PluginHostFactory and PluginLifecycle drop the legacy DI singletons and AddWindow entries. Build is clean and csharpier is clean across the trimmed 131-file tree.
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
namespace HellionChat.Ui;
|
||||
|
||||
// Deterministic hash-based color and icon tinting for Auto-Tell sidebar tabs.
|
||||
// Same tell partner (name+world) always produces the same color and icon across
|
||||
// sessions. Pure string logic, no Dalamud dependency — testable without game refs.
|
||||
internal static class AutoTellTabTint
|
||||
{
|
||||
// Fallback for invalid input (empty name or world=0). White matches
|
||||
// TextPrimary default so the sidebar stays visually consistent.
|
||||
public const uint Fallback = 0xFFFFFFFFu;
|
||||
|
||||
// 12 saturated mid-bright colors from the built-in theme pool, readable
|
||||
// on dark backgrounds. Collision risk is low at realistic 1-5 active tells.
|
||||
// RGBA format, matching ColourUtil.RgbaToAbgr convention.
|
||||
public static readonly IReadOnlyList<uint> Palette = new uint[]
|
||||
{
|
||||
0x00BED2FFu, // Arctic Cyan
|
||||
0xF97316FFu, // Ember Orange
|
||||
0xB585FFFFu, // Light Cosmic Purple
|
||||
0xE374E8FFu, // Bloom Magenta
|
||||
0x5DD39EFFu, // Mint Green
|
||||
0xF0AD4EFFu, // Warning Yellow
|
||||
0xE85C6AFFu, // Coral
|
||||
0x5CB85CFFu, // Status Green
|
||||
0x6278FFFFu, // Bloom Blue
|
||||
0xC9982EFFu, // Warm Gold
|
||||
0x9CCB7CFFu, // Soft Sage
|
||||
0xE85D04FFu, // Deep Ember
|
||||
};
|
||||
|
||||
public static uint For(string name, uint world)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name) || world == 0)
|
||||
return Fallback;
|
||||
|
||||
// Mask to positive range so modulo always yields a valid index.
|
||||
var key = $"{name}@{world}";
|
||||
var hash = (uint)(key.GetHashCode() & 0x7FFFFFFF);
|
||||
return Palette[(int)(hash % Palette.Count)];
|
||||
}
|
||||
|
||||
// 7 visually distinct FA glyphs that make sense in a tell context.
|
||||
// Excludes cog/comment/users — those read as system or group tabs.
|
||||
public static readonly IReadOnlyList<string> IconPool = new[]
|
||||
{
|
||||
"envelope",
|
||||
"star",
|
||||
"heart",
|
||||
"bell",
|
||||
"bookmark",
|
||||
"flag",
|
||||
"fire",
|
||||
};
|
||||
|
||||
// "envelope" matches the tell context better than the old hardcoded "clock".
|
||||
public const string IconFallback = "envelope";
|
||||
|
||||
public static string IconFor(string name, uint world)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name) || world == 0)
|
||||
return IconFallback;
|
||||
|
||||
// Reversed key ("world@name") gives icon and color independent variation
|
||||
// so the same tell partner doesn't always get the same color+icon pair.
|
||||
// 7 icons x 12 colors = 84 distinct combinations.
|
||||
var key = $"{world}@{name}";
|
||||
var hash = (uint)(key.GetHashCode() & 0x7FFFFFFF);
|
||||
return IconPool[(int)(hash % IconPool.Count)];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user