From 015562d4226db8e04b5add0a33e290d177e8c5a3 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Mon, 8 Jun 2020 20:51:16 +0200 Subject: [PATCH] fix: use another directory for testing plugins --- Dalamud/Dalamud.cs | 11 +++++--- Dalamud/Interface/DalamudSettingsWindow.cs | 32 +++++++++++----------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index 4fabac63d..805649a43 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -138,12 +138,15 @@ namespace Dalamud { this.BotManager = new DiscordBotManager(this, this.Configuration.DiscordFeatureConfig); this.BotManager.Start(); - try - { - this.PluginManager = new PluginManager(this, this.StartInfo.PluginDirectory, this.StartInfo.DefaultPluginDirectory); + try { + var pluginDir = this.StartInfo.PluginDirectory; + if (this.Configuration.DoPluginTest) + pluginDir = Path.Combine(pluginDir, "..", "testPlugins"); + + this.PluginManager = new PluginManager(this, pluginDir, this.StartInfo.DefaultPluginDirectory); this.PluginManager.LoadPlugins(); - this.PluginRepository = new PluginRepository(this, this.StartInfo.PluginDirectory, this.StartInfo.GameVersion); + this.PluginRepository = new PluginRepository(this, pluginDir, this.StartInfo.GameVersion); } catch (Exception ex) { diff --git a/Dalamud/Interface/DalamudSettingsWindow.cs b/Dalamud/Interface/DalamudSettingsWindow.cs index e91529c68..4d29acfc7 100644 --- a/Dalamud/Interface/DalamudSettingsWindow.cs +++ b/Dalamud/Interface/DalamudSettingsWindow.cs @@ -58,7 +58,7 @@ namespace Dalamud.Interface var isOpen = true; - if (!ImGui.Begin("Dalamud Settings", ref isOpen, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize)) { + if (!ImGui.Begin(Loc.Localize("DalamudSettingsHeader", "Dalamud Settings") + "###XlSettings", ref isOpen, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoResize)) { ImGui.End(); return false; } @@ -66,38 +66,38 @@ namespace Dalamud.Interface ImGui.BeginChild("scrolling", new Vector2(499, 430), false, ImGuiWindowFlags.HorizontalScrollbar); if (ImGui.BeginTabBar("SetTabBar")) { - if (ImGui.BeginTabItem("General")) { - ImGui.Text("Language"); + if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsGeneral", "General"))) { + ImGui.Text(Loc.Localize("DalamudSettingsLanguage","Language")); ImGui.Combo("##XlLangCombo", ref this.langIndex, this.languages, this.languages.Length); - ImGui.TextColored(this.hintTextColor, "Select the language Dalamud will be displayed in."); + ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsLanguageHint", "Select the language Dalamud will be displayed in.")); ImGui.Dummy(new Vector2(5f, 5f)); - ImGui.Text("General Chat Channel"); + ImGui.Text(Loc.Localize("DalamudSettingsChannel", "General Chat Channel")); ImGui.Combo("##XlChatTypeCombo", ref this.dalamudMessagesChatType, this.chatTypes, this.chatTypes.Length); - ImGui.TextColored(this.hintTextColor, "Select the chat channel that is to be used for general XIVLauncher messages."); + ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsChannelHint", "Select the chat channel that is to be used for general XIVLauncher messages.")); ImGui.Dummy(new Vector2(5f, 5f)); - ImGui.Checkbox("Flash FFXIV window on duty pop", ref this.doCfTaskBarFlash); - ImGui.TextColored(this.hintTextColor, "Select, if the FFXIV window should be flashed in your task bar when a duty is ready."); + ImGui.Checkbox(Loc.Localize("DalamudSettingsFlash", "Flash FFXIV window on duty pop"), ref this.doCfTaskBarFlash); + ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsFlashHint", "Select, if the FFXIV window should be flashed in your task bar when a duty is ready.")); ImGui.EndTabItem(); } - if (ImGui.BeginTabItem("Experimental")) + if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsExperimental", "Experimental"))) { - ImGui.Text("All of these settings require a restart of the game to take effect."); + ImGui.Text(Loc.Localize("DalamudSettingsRestartHint", "You need to restart your game after changing these settings.")); ImGui.Dummy(new Vector2(10f, 10f)); - ImGui.Checkbox("Get plugin testing builds", ref this.doPluginTest); - ImGui.TextColored(this.hintTextColor, "Check this box to receive testing prereleases for plugins."); + ImGui.Checkbox(Loc.Localize("DalamudSettingsPluginTest", "Get plugin testing builds"), ref this.doPluginTest); + ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsPluginTestHint", "Check this box to receive testing prereleases for plugins.")); - ImGui.Checkbox("Get Dalamud testing builds", ref this.doDalamudTest); - ImGui.TextColored(this.hintTextColor, "Check this box to receive testing prereleases for Dalamud."); + ImGui.Checkbox(Loc.Localize("DalamudSettingDalamudTest", "Get Dalamud testing builds"), ref this.doDalamudTest); + ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingDalamudTestHint", "Check this box to receive testing prereleases for Dalamud.")); ImGui.EndTabItem(); } @@ -108,11 +108,11 @@ namespace Dalamud.Interface ImGui.EndChild(); - if (ImGui.Button("Save")) { + if (ImGui.Button(Loc.Localize("Save", "Save"))) { Save(); } ImGui.SameLine(); - if (ImGui.Button("Save and Close")) { + if (ImGui.Button(Loc.Localize("SaveAndClose", "Save and Close"))) { Save(); isOpen = false; }