From d36106fa3012b4491ed5c40792ae154bf8941537 Mon Sep 17 00:00:00 2001 From: KazWolfe Date: Mon, 25 Mar 2024 04:22:44 -0700 Subject: [PATCH] feat: Add HelpMarker with custom `icon` (#1588) --- .../Components/ImGuiComponents.HelpMarker.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs b/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs index f57746eca..f0ecf2f2f 100644 --- a/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs +++ b/Dalamud/Interface/Components/ImGuiComponents.HelpMarker.cs @@ -11,11 +11,18 @@ public static partial class ImGuiComponents /// HelpMarker component to add a help icon with text on hover. /// /// The text to display on hover. - public static void HelpMarker(string helpText) + public static void HelpMarker(string helpText) => HelpMarker(helpText, FontAwesomeIcon.InfoCircle); + + /// + /// HelpMarker component to add a custom icon with text on hover. + /// + /// The text to display on hover. + /// The icon to use. + public static void HelpMarker(string helpText, FontAwesomeIcon icon) { ImGui.SameLine(); ImGui.PushFont(UiBuilder.IconFont); - ImGui.TextDisabled(FontAwesomeIcon.InfoCircle.ToIconString()); + ImGui.TextDisabled(icon.ToIconString()); ImGui.PopFont(); if (!ImGui.IsItemHovered()) return; ImGui.BeginTooltip();