diff --git a/LImGui.HeaderIcon.cs b/LImGui.HeaderIcon.cs index e65be9a..81cab68 100644 --- a/LImGui.HeaderIcon.cs +++ b/LImGui.HeaderIcon.cs @@ -27,7 +27,7 @@ partial class LImGui private static float _headerCurrentPos = 0; private static float _headerImGuiButtonWidth = 0; - public static bool AddHeaderIcon(DalamudPluginInterface pluginInterface, string id, FontAwesomeIcon icon, HeaderIconOptions options = null) + public static bool AddHeaderIcon(DalamudPluginInterface pluginInterface, string id, FontAwesomeIcon icon, HeaderIconOptions? options = null) { if (ImGui.IsWindowCollapsed()) return false; @@ -45,6 +45,13 @@ partial class LImGui _headerImGuiButtonWidth += 17 * scale; if (!GetCurrentWindowFlags().HasFlag(ImGuiWindowFlags.NoCollapse)) _headerImGuiButtonWidth += 17 * scale; + + if (!CurrentWindowHasCloseButton() && + GetCurrentWindowFlags().HasFlag(ImGuiWindowFlags.NoCollapse) && + GetCurrentWindowFlags().HasFlag(ImGuiWindowFlags.AlwaysAutoResize)) + _headerImGuiButtonWidth += 5 * scale; + else + _headerImGuiButtonWidth += 10 * scale; } options ??= new(); diff --git a/LImGui.cs b/LImGui.cs index 7b5aa96..ed53332 100644 --- a/LImGui.cs +++ b/LImGui.cs @@ -12,17 +12,15 @@ public static partial class LImGui { if (AddHeaderIcon(pluginInterface, "##Patreon", FontAwesomeIcon.Heart, new HeaderIconOptions { - Tooltip = "Open Liza's page on Patreon", - Color = 0xFF000FF, - Offset = Vector2.Zero, - MouseButton = ImGuiMouseButton.Left + Tooltip = "Go to patreon.com/lizac", + Color = 0xFF3030D0, })) { try { Process.Start(new ProcessStartInfo { - FileName = "http://patreon.com/lizac", + FileName = "https://www.patreon.com/lizac", UseShellExecute = true, Verb = string.Empty, }); diff --git a/packages.lock.json b/packages.lock.json new file mode 100644 index 0000000..4ead528 --- /dev/null +++ b/packages.lock.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "dependencies": { + "net7.0-windows7.0": {} + } +} \ No newline at end of file