1
0
annas-questmap/Quest Map/Util.cs
2021-07-21 02:11:01 -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();
}
}
}