From eaf0a71b3ce0a6fa99e6773c843da7cce35e3986 Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 14 Mar 2024 15:13:05 -0400 Subject: [PATCH] feat: add a suggestions tab --- client/EorzeaVotes/Ui/PluginUi.cs | 1 + client/EorzeaVotes/Ui/Tabs/SuggestTab.cs | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 client/EorzeaVotes/Ui/Tabs/SuggestTab.cs diff --git a/client/EorzeaVotes/Ui/PluginUi.cs b/client/EorzeaVotes/Ui/PluginUi.cs index bc365e0..0afd0f5 100644 --- a/client/EorzeaVotes/Ui/PluginUi.cs +++ b/client/EorzeaVotes/Ui/PluginUi.cs @@ -211,5 +211,6 @@ internal class PluginUi : IDisposable { this.QuestionsTab.Draw(); this.SettingsTab.Draw(); + SuggestTab.Draw(); } } diff --git a/client/EorzeaVotes/Ui/Tabs/SuggestTab.cs b/client/EorzeaVotes/Ui/Tabs/SuggestTab.cs new file mode 100644 index 0000000..32ef3c3 --- /dev/null +++ b/client/EorzeaVotes/Ui/Tabs/SuggestTab.cs @@ -0,0 +1,22 @@ +using System.Diagnostics; +using System.Numerics; +using ImGuiNET; + +namespace EorzeaVotes.Ui.Tabs; + +internal class SuggestTab { + internal static void Draw() { + if (!ImGui.BeginTabItem("Suggest a question")) { + return; + } + + ImGui.TextUnformatted("If you have an idea for a question, feel free to submit it using the website below!"); + + var availX = ImGui.GetContentRegionAvail().X; + if (ImGui.Button("Open suggestion website", new Vector2(availX, 0))) { + Process.Start(new ProcessStartInfo("https://eorzeavotes.anna.lgbt") { + UseShellExecute = true, + }); + } + } +} \ No newline at end of file