From 71165b599b7d152066060bfd586d646af4c7628a Mon Sep 17 00:00:00 2001
From: goat <16760685+goaaats@users.noreply.github.com>
Date: Tue, 28 Sep 2021 03:54:45 +0200
Subject: [PATCH] loc: style editor, feedback tweaks
---
Dalamud.CorePlugin/PluginWindow.cs | 21 ++++++++++++++++++-
.../Internal/Windows/PluginInstallerWindow.cs | 6 +++---
.../Windows/StyleEditor/StyleEditorWindow.cs | 4 ++--
Dalamud/Support/BugBait.cs | 2 +-
4 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/Dalamud.CorePlugin/PluginWindow.cs b/Dalamud.CorePlugin/PluginWindow.cs
index b42b9069b..efc3ce2f7 100644
--- a/Dalamud.CorePlugin/PluginWindow.cs
+++ b/Dalamud.CorePlugin/PluginWindow.cs
@@ -1,7 +1,8 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
-
+using Dalamud.Interface;
+using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing;
using ImGuiNET;
@@ -12,6 +13,9 @@ namespace Dalamud.CorePlugin
///
internal class PluginWindow : Window, IDisposable
{
+ private Vector4 bgCol = ImGuiColors.HealerGreen;
+ private Vector4 textCol = ImGuiColors.DalamudWhite;
+
///
/// Initializes a new instance of the class.
///
@@ -37,6 +41,21 @@ namespace Dalamud.CorePlugin
///
public override void Draw()
{
+ ImGui.ColorPicker4("bg", ref this.bgCol);
+ ImGui.ColorPicker4("text", ref this.textCol);
+
+ ImGui.PushStyleColor(ImGuiCol.ChildBg, this.bgCol);
+ ImGui.PushStyleColor(ImGuiCol.Text, this.textCol);
+
+ if (ImGui.BeginChild("##changelog", new Vector2(-1, 100), true, ImGuiWindowFlags.NoNavFocus | ImGuiWindowFlags.NoNavInputs | ImGuiWindowFlags.AlwaysAutoResize))
+ {
+ ImGui.Text("Changelog:");
+ ImGuiHelpers.ScaledDummy(2);
+ ImGui.TextWrapped("* ASIhif ai fdh adhsfuoadf\n* IUHoiaudsfh adsof hioaudshfuio husiodfh\n* A iiaojfdpasd ijopadfnklafwjenalkfjensgdlkjnasasdfbhnj");
+ }
+
+ ImGui.EndChild();
+ ImGui.PopStyleColor(2);
}
}
}
diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs
index 58e5ad709..550586e28 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs
@@ -470,7 +470,7 @@ namespace Dalamud.Interface.Internal.Windows
if (ImGui.BeginPopupModal(modalTitle, ref this.feedbackModalDrawing, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoScrollbar))
{
- ImGui.Text(Locs.FeedbackModal_Text);
+ ImGui.Text(Locs.FeedbackModal_Text(this.feedbackPlugin.Name));
ImGui.Spacing();
ImGui.InputTextMultiline("###FeedbackContent", ref this.feedbackModalBody, 1000, new Vector2(400, 200));
@@ -1342,7 +1342,7 @@ namespace Dalamud.Interface.Internal.Windows
this.DrawDeletePluginButton(plugin);
this.DrawVisitRepoUrlButton(plugin.Manifest.RepoUrl);
- if (!isThirdParty)
+ if (!isThirdParty && !plugin.IsDev)
{
this.DrawSendFeedbackButton(plugin.Manifest);
}
@@ -2292,7 +2292,7 @@ namespace Dalamud.Interface.Internal.Windows
public static string FeedbackModal_Title => Loc.Localize("InstallerFeedback", "Send Feedback");
- public static string FeedbackModal_Text => Loc.Localize("InstallerFeedbackInfo", "You can send feedback to the developer of this plugin here.\nYou can include your Discord tag or email address if you wish to give them the opportunity to answer.");
+ public static string FeedbackModal_Text(string pluginName) => Loc.Localize("InstallerFeedbackInfo", "You can send feedback to the developer of \"{0}\" here.\nYou can include your Discord tag or email address if you wish to give them the opportunity to answer.").Format(pluginName);
public static string FeedbackModal_Hint => Loc.Localize("InstallerFeedbackHint", "All plugin developers will be able to see your feedback.\nPlease never include any personal or revealing information.\nIf you chose to include the last error message, information like your Windows username may be included.\n\nThe collected feedback is not stored on our end and immediately relayed to Discord.");
diff --git a/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs b/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs
index d72c7dc0a..c38963761 100644
--- a/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs
@@ -198,7 +198,7 @@ namespace Dalamud.Interface.Internal.Windows.StyleEditor
{
var style = ImGui.GetStyle();
- if (ImGui.BeginTabItem("Variables"))
+ if (ImGui.BeginTabItem(Loc.Localize("StyleEditorVariables", "Variables")))
{
ImGui.BeginChild($"ScrollingVars", ImGuiHelpers.ScaledVector2(0, -32), true, ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoBackground);
@@ -250,7 +250,7 @@ namespace Dalamud.Interface.Internal.Windows.StyleEditor
ImGui.EndTabItem();
}
- if (ImGui.BeginTabItem("Colors"))
+ if (ImGui.BeginTabItem(Loc.Localize("StyleEditorColors", "Colors")))
{
ImGui.BeginChild("ScrollingColors", ImGuiHelpers.ScaledVector2(0, -30), true, ImGuiWindowFlags.HorizontalScrollbar | ImGuiWindowFlags.NoBackground);
diff --git a/Dalamud/Support/BugBait.cs b/Dalamud/Support/BugBait.cs
index 31f720669..947fcdb6a 100644
--- a/Dalamud/Support/BugBait.cs
+++ b/Dalamud/Support/BugBait.cs
@@ -13,7 +13,7 @@ namespace Dalamud.Support
///
internal static class BugBait
{
- private const string BugBaitUrl = "https://dalamud-bugbait.goatsoft.workers.dev/feedback";
+ private const string BugBaitUrl = "https://kiko.goats.dev/feedback";
///
/// Send feedback to Discord.