1f2cb000a2
Hellion Chat is an independent fork with its own assembly name and
plugin slot, but it kept registering the upstream /chat2* slash
commands. That mixed naming caused two friction points: users could
not tell from the in-game help which plugin owned the command, and
running both Hellion Chat and the upstream Chat 2 side by side would
collide on the registration.
Five commands change:
/chat2 -> /hellion (settings + chat toggle)
/chat2Viewer -> /hellionView (database viewer)
/chat2Debugger -> /hellionDebugger (internal, not shown in help)
/chat2SeString -> /hellionSeString (internal, debug-only)
/clearlog2 -> /clearhellion (clear chat log)
Help strings ("Perform various actions with Chat 2.", "Clear the
Chat 2 chat log") are reworded to match. ImGui internal window IDs
(###chat2-settings, ###chat2-dbviewer) are left untouched on purpose
so existing user layouts for those windows do not snap back to
default. Resource files do not reference any of these command names,
so no localisation work needed.
73 lines
3.0 KiB
C#
73 lines
3.0 KiB
C#
using System.Numerics;
|
|
using ChatTwo.Code;
|
|
using Dalamud.Interface.Colors;
|
|
using Dalamud.Interface.Utility;
|
|
using Dalamud.Interface.Windowing;
|
|
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
|
using Dalamud.Bindings.ImGui;
|
|
using Lumina.Text.ReadOnly;
|
|
|
|
namespace ChatTwo.Ui;
|
|
|
|
public class DebuggerWindow : Window
|
|
{
|
|
private readonly Plugin Plugin;
|
|
private readonly ChatLogWindow ChatLogWindow;
|
|
|
|
public DebuggerWindow(Plugin plugin) : base("Debugger###chat2-debugger")
|
|
{
|
|
Plugin = plugin;
|
|
ChatLogWindow = plugin.ChatLogWindow;
|
|
|
|
SizeConstraints = new WindowSizeConstraints
|
|
{
|
|
MinimumSize = new Vector2(475, 600),
|
|
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
|
|
};
|
|
|
|
RespectCloseHotkey = false;
|
|
DisableWindowSounds = true;
|
|
|
|
Plugin.Commands.Register("/hellionDebugger", showInHelp: false).Execute += Toggle;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Plugin.Commands.Register("/hellionDebugger", showInHelp: false).Execute -= Toggle;
|
|
}
|
|
|
|
private void Toggle(string _, string __) => Toggle();
|
|
|
|
public override unsafe void Draw()
|
|
{
|
|
var agent = (nint) AgentItemDetail.Instance();
|
|
ImGui.TextUnformatted($"Current Cursor Pos: {ChatLogWindow.CursorPos}");
|
|
if (ImGui.Selectable($"Agent Address: {agent:X}"))
|
|
ImGui.SetClipboardText(agent.ToString("X"));
|
|
|
|
ImGuiHelpers.ScaledDummy(5.0f);
|
|
|
|
ImGui.TextUnformatted($"Handle Tooltips: {ChatLogWindow.PayloadHandler.HandleTooltips}");
|
|
ImGui.TextUnformatted($"Hovered Item: {ChatLogWindow.PayloadHandler.HoveredItem}");
|
|
ImGui.TextUnformatted($"Hover Counter: {ChatLogWindow.PayloadHandler.HoverCounter}");
|
|
ImGui.TextUnformatted($"Last Hover Counter: {ChatLogWindow.PayloadHandler.LastHoverCounter}");
|
|
|
|
ImGuiHelpers.ScaledDummy(5.0f);
|
|
|
|
ImGui.TextColored(ImGuiColors.DalamudOrange, "Current Tab");
|
|
ImGui.TextUnformatted($"Name: {Plugin.CurrentTab.Name}");
|
|
ImGui.TextUnformatted($"Channel: {Plugin.CurrentTab.CurrentChannel.Channel.ToChatType().Name()}");
|
|
ImGui.TextUnformatted($"Tell Target: {Plugin.CurrentTab.CurrentChannel.TellTarget?.ToTargetString() ?? "Null"}");
|
|
ImGui.TextUnformatted($"Use Temp? {Plugin.CurrentTab.CurrentChannel.UseTempChannel}");
|
|
ImGui.TextUnformatted($"Temp Channel: {Plugin.CurrentTab.CurrentChannel.TempChannel.ToChatType().Name()}");
|
|
ImGui.TextUnformatted($"Temp Tell Target: {Plugin.CurrentTab.CurrentChannel.TempTellTarget?.ToTargetString() ?? "Null"}");
|
|
ImGui.TextUnformatted($"Name Set? {Plugin.CurrentTab.CurrentChannel.Name.Count > 0}");
|
|
ImGui.TextUnformatted($"Name {string.Join(" ", Plugin.CurrentTab.CurrentChannel.Name.Select(c => c.StringValue()))}");
|
|
|
|
ImGuiHelpers.ScaledDummy(5.0f);
|
|
|
|
ImGui.TextColored(ImGuiColors.DalamudOrange, "Vanilla Chat");
|
|
ImGui.TextUnformatted($"Channel: {new ReadOnlySeString(AgentChatLog.Instance()->ChannelLabel).ExtractText()}");
|
|
}
|
|
}
|