1
0
annas-questmap/QuestMap/Util.cs
2022-08-21 14:55:55 -04:00

32 lines
730 B
C#

using Dalamud.Interface;
using ImGuiNET;
namespace QuestMap {
internal static class Util {
internal static bool IconButton(FontAwesomeIcon icon, string? id = null) {
ImGui.PushFont(UiBuilder.IconFont);
var label = icon.ToIconString();
if (id != null) {
label += $"##{id}";
}
var ret = ImGui.Button(label);
ImGui.PopFont();
return ret;
}
internal static void Tooltip(string tooltip) {
if (!ImGui.IsItemHovered()) {
return;
}
ImGui.BeginTooltip();
ImGui.TextUnformatted(tooltip);
ImGui.EndTooltip();
}
}
}