Prevent vanilla tooltip for event item and implement #28
This commit is contained in:
@@ -74,7 +74,7 @@ public sealed class ChatLogWindow : Window
|
||||
public unsafe ImGuiViewport* LastViewport;
|
||||
private bool WasDocked;
|
||||
|
||||
private PayloadHandler PayloadHandler { get; }
|
||||
public PayloadHandler PayloadHandler { get; }
|
||||
internal Lender<PayloadHandler> HandlerLender { get; }
|
||||
private Dictionary<string, ChatType> TextCommandChannels { get; } = new();
|
||||
private HashSet<string> AllCommands { get; } = [];
|
||||
@@ -578,6 +578,32 @@ public sealed class ChatLogWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
var showNovice = Plugin.Config.ShowNoviceNetwork && Plugin.Functions.IsMentor();
|
||||
if (activeTab is { InputDisabled: true })
|
||||
{
|
||||
Plugin.FontManager.FontAwesome.Push();
|
||||
var buttonSize = ImGui.CalcTextSize(FontAwesomeIcon.Cog.ToIconString());
|
||||
var spacing = ImGui.GetContentRegionAvail().X - buttonSize.X * (showNovice ? 2 : 1);
|
||||
Plugin.FontManager.FontAwesome.Pop();
|
||||
|
||||
ImGui.Dummy(buttonSize with { X = spacing });
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip(Language.ChatLog_DisabledInput);
|
||||
|
||||
ImGui.SameLine(spacing);
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.Cog))
|
||||
Plugin.SettingsWindow.Toggle();
|
||||
|
||||
if (!showNovice)
|
||||
return;
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.Leaf))
|
||||
Plugin.Functions.ClickNoviceNetworkButton();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var beforeIcon = ImGui.GetCursorPos();
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.Comment) && activeTab is not { Channel: not null })
|
||||
ImGui.OpenPopup(ChatChannelPicker);
|
||||
@@ -629,7 +655,6 @@ public sealed class ChatLogWindow : Window
|
||||
var afterIcon = ImGui.GetCursorPos();
|
||||
|
||||
var buttonWidth = afterIcon.X - beforeIcon.X;
|
||||
var showNovice = Plugin.Config.ShowNoviceNetwork && Plugin.Functions.IsMentor();
|
||||
var inputWidth = ImGui.GetContentRegionAvail().X - buttonWidth * (showNovice ? 2 : 1);
|
||||
|
||||
var inputType = TempChannel?.ToChatType() ?? activeTab?.Channel?.ToChatType() ?? Plugin.Functions.Chat.Channel.Channel.ToChatType();
|
||||
|
||||
+11
-1
@@ -1,5 +1,7 @@
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace ChatTwo.Ui;
|
||||
@@ -37,8 +39,16 @@ public class DebuggerWindow : Window
|
||||
|
||||
private void Toggle(string _, string __) => Toggle();
|
||||
|
||||
public override void Draw()
|
||||
public override unsafe void Draw()
|
||||
{
|
||||
var agent = (nint) Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ItemDetail);
|
||||
ImGui.TextUnformatted($"Current Cursor Pos: {ChatLogWindow.CursorPos}");
|
||||
if (ImGui.Selectable($"Agent Address: {agent:X}"))
|
||||
ImGui.SetClipboardText(agent.ToString("X"));
|
||||
|
||||
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}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ internal sealed class About : ISettingsTab
|
||||
|
||||
ImGui.TextUnformatted(Language.Options_About_Authors);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.ParsedGold, Plugin.Authors);
|
||||
ImGui.TextColored(ImGuiColors.ParsedGold, Plugin.Interface.Manifest.Author);
|
||||
|
||||
ImGui.TextUnformatted(Language.Options_About_Discord);
|
||||
ImGui.SameLine();
|
||||
@@ -49,7 +49,7 @@ internal sealed class About : ISettingsTab
|
||||
|
||||
ImGui.TextUnformatted(Language.Options_About_Version);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.ParsedOrange, Plugin.Version);
|
||||
ImGui.TextColored(ImGuiColors.ParsedOrange, Plugin.Interface.Manifest.AssemblyVersion.ToString(3));
|
||||
|
||||
ImGuiHelpers.ScaledDummy(10.0f);
|
||||
|
||||
|
||||
@@ -108,9 +108,11 @@ internal sealed class Tabs : ISettingsTab
|
||||
}
|
||||
}
|
||||
|
||||
var input = tab.Channel?.ToChatType().Name() ?? Language.Options_Tabs_NoInputChannel;
|
||||
using (var combo = ImGuiUtil.BeginComboVertical(Language.Options_Tabs_InputChannel, input))
|
||||
ImGui.Checkbox(Language.Options_Tabs_NoInput, ref tab.InputDisabled);
|
||||
if (!tab.InputDisabled)
|
||||
{
|
||||
var input = tab.Channel?.ToChatType().Name() ?? Language.Options_Tabs_NoInputChannel;
|
||||
using var combo = ImGuiUtil.BeginComboVertical(Language.Options_Tabs_InputChannel, input);
|
||||
if (combo)
|
||||
{
|
||||
if (ImGui.Selectable(Language.Options_Tabs_NoInputChannel, tab.Channel == null))
|
||||
|
||||
Reference in New Issue
Block a user