feat: add ko-fi button
This commit is contained in:
parent
0de1df2487
commit
85ab87c9dd
|
@ -1,5 +1,7 @@
|
||||||
using System.Numerics;
|
using System.Diagnostics;
|
||||||
|
using System.Numerics;
|
||||||
using ChatTwo.Ui.SettingsTabs;
|
using ChatTwo.Ui.SettingsTabs;
|
||||||
|
using ChatTwo.Util;
|
||||||
using Dalamud.Game.Command;
|
using Dalamud.Game.Command;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
||||||
|
@ -91,6 +93,26 @@ internal sealed class Settings : IUiComponent {
|
||||||
this.Ui.SettingsVisible = false;
|
this.Ui.SettingsVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var buttonLabel = $"Support {this.Ui.Plugin.Name} on Ko-Fi";
|
||||||
|
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.Button, ColourUtil.RgbaToAbgr(0xFF5E5BFF));
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.ButtonHovered, ColourUtil.RgbaToAbgr(0xFF7775FF));
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.ButtonActive, ColourUtil.RgbaToAbgr(0xFF4542FF));
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.Text, 0xFFFFFFFF);
|
||||||
|
|
||||||
|
try {
|
||||||
|
var buttonWidth = ImGui.CalcTextSize(buttonLabel).X + ImGui.GetStyle().FramePadding.X * 2;
|
||||||
|
ImGui.SameLine(ImGui.GetContentRegionAvail().X - buttonWidth);
|
||||||
|
|
||||||
|
if (ImGui.Button(buttonLabel)) {
|
||||||
|
Process.Start(new ProcessStartInfo("https://ko-fi.com/ascclemens") {
|
||||||
|
UseShellExecute = true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
ImGui.PopStyleColor(4);
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.End();
|
ImGui.End();
|
||||||
|
|
||||||
if (save) {
|
if (save) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user