Add ko-fi and switch crowdin project
This commit is contained in:
+11
-5
@@ -117,7 +117,8 @@ internal sealed class Settings : IUiComponent {
|
||||
this.Ui.SettingsVisible = false;
|
||||
}
|
||||
|
||||
var buttonLabel = string.Format(Language.Settings_Kofi, Plugin.PluginName);
|
||||
var buttonLabel = "Anna's Ko-fi";
|
||||
var buttonLabel2 = "Infi's Ko-fi";
|
||||
|
||||
ImGui.PushStyleColor(ImGuiCol.Button, ColourUtil.RgbaToAbgr(0xFF5E5BFF));
|
||||
ImGui.PushStyleColor(ImGuiCol.ButtonHovered, ColourUtil.RgbaToAbgr(0xFF7775FF));
|
||||
@@ -126,12 +127,17 @@ internal sealed class Settings : IUiComponent {
|
||||
|
||||
try {
|
||||
var buttonWidth = ImGui.CalcTextSize(buttonLabel).X + ImGui.GetStyle().FramePadding.X * 2;
|
||||
ImGui.SameLine(ImGui.GetContentRegionAvail().X - buttonWidth);
|
||||
var buttonWidth2 = ImGui.CalcTextSize(buttonLabel2).X + ImGui.GetStyle().FramePadding.X * 2;
|
||||
ImGui.SameLine(ImGui.GetContentRegionAvail().X - buttonWidth - buttonWidth2);
|
||||
|
||||
if (ImGui.Button(buttonLabel2)) {
|
||||
Dalamud.Utility.Util.OpenLink("https://ko-fi.com/infiii");
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGui.Button(buttonLabel)) {
|
||||
Process.Start(new ProcessStartInfo("https://ko-fi.com/lojewalo") {
|
||||
UseShellExecute = true,
|
||||
});
|
||||
Dalamud.Utility.Util.OpenLink("https://ko-fi.com/lojewalo");
|
||||
}
|
||||
} finally {
|
||||
ImGui.PopStyleColor(4);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Diagnostics;
|
||||
using System.Numerics;
|
||||
using ChatTwo.Resources;
|
||||
using ChatTwo.Util;
|
||||
@@ -10,37 +9,21 @@ namespace ChatTwo.Ui.SettingsTabs;
|
||||
internal sealed class About : ISettingsTab {
|
||||
public string Name => string.Format(Language.Options_About_Tab, Plugin.PluginName) + "###tabs-about";
|
||||
|
||||
private readonly List<string> _translators = new() {
|
||||
"q673135110",
|
||||
"Akizem",
|
||||
"d0tiKs",
|
||||
"Moonlight_Everlit",
|
||||
"Dark32",
|
||||
"andreycout",
|
||||
"Button_",
|
||||
"Cali666",
|
||||
"cassandra308",
|
||||
"lokinmodar",
|
||||
"jtabox",
|
||||
"AkiraYorumoto",
|
||||
"MKhayle",
|
||||
"elena.space",
|
||||
"imlisa",
|
||||
"andrei5125",
|
||||
"ShivaMaheshvara",
|
||||
"aislinn87",
|
||||
"nishinatsu051",
|
||||
"lichuyuan",
|
||||
"Risu64",
|
||||
"yummypillow",
|
||||
"witchymary",
|
||||
"Yuzumi",
|
||||
"zomsakura",
|
||||
"Sirayuki",
|
||||
};
|
||||
private readonly List<string> _translators =
|
||||
[
|
||||
"q673135110", "Akizem", "d0tiKs",
|
||||
"Moonlight_Everlit", "Dark32", "andreycout",
|
||||
"Button_", "Cali666", "cassandra308",
|
||||
"lokinmodar", "jtabox", "AkiraYorumoto",
|
||||
"MKhayle", "elena.space", "imlisa",
|
||||
"andrei5125", "ShivaMaheshvara", "aislinn87",
|
||||
"nishinatsu051", "lichuyuan", "Risu64",
|
||||
"yummypillow", "witchymary", "Yuzumi",
|
||||
"zomsakura", "Sirayuki"
|
||||
];
|
||||
|
||||
internal About() {
|
||||
this._translators.Sort((a, b) => string.Compare(a.ToLowerInvariant(), b.ToLowerInvariant(), StringComparison.Ordinal));
|
||||
_translators.Sort((a, b) => string.Compare(a.ToLowerInvariant(), b.ToLowerInvariant(), StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
public void Draw(bool changed) {
|
||||
@@ -50,19 +33,17 @@ internal sealed class About : ISettingsTab {
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ExternalLinkAlt, "clickup")) {
|
||||
Process.Start(new ProcessStartInfo("https://sharing.clickup.com/b/h/6-122378074-2/1047d21a39a4140") {
|
||||
UseShellExecute = true,
|
||||
});
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ExternalLinkAlt, "clickup"))
|
||||
{
|
||||
Dalamud.Utility.Util.OpenLink("https://sharing.clickup.com/b/h/6-122378074-2/1047d21a39a4140");
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(Language.Options_About_ClickUp);
|
||||
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ExternalLinkAlt, "crowdin")) {
|
||||
Process.Start(new ProcessStartInfo("https://crowdin.com/project/chat-2") {
|
||||
UseShellExecute = true,
|
||||
});
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ExternalLinkAlt, "crowdin"))
|
||||
{
|
||||
Dalamud.Utility.Util.OpenLink("https://crowdin.com/project/chattwo");
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
@@ -70,13 +51,11 @@ internal sealed class About : ISettingsTab {
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
var height = ImGui.GetContentRegionAvail().Y
|
||||
- ImGui.CalcTextSize("A").Y
|
||||
- ImGui.GetStyle().ItemSpacing.Y * 2;
|
||||
var height = ImGui.GetContentRegionAvail().Y - ImGui.CalcTextSize("A").Y - ImGui.GetStyle().ItemSpacing.Y * 2;
|
||||
if (ImGui.BeginChild("about", new Vector2(-1, height))) {
|
||||
if (ImGui.TreeNodeEx(Language.Options_About_Translators)) {
|
||||
if (ImGui.BeginChild("translators")) {
|
||||
foreach (var translator in this._translators) {
|
||||
foreach (var translator in _translators) {
|
||||
ImGui.TextUnformatted(translator);
|
||||
}
|
||||
|
||||
@@ -89,7 +68,7 @@ internal sealed class About : ISettingsTab {
|
||||
ImGui.EndChild();
|
||||
}
|
||||
|
||||
ImGuiUtil.HelpText($"{Plugin.PluginName} v{this.GetType().Assembly.GetName().Version?.ToString(3)}");
|
||||
ImGuiUtil.HelpText($"{Plugin.PluginName} v{GetType().Assembly.GetName().Version?.ToString(3)}");
|
||||
ImGui.PopTextWrapPos();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user