mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Add setting to not print plugins on login + polish settings
This commit is contained in:
parent
f912e42f94
commit
52b1293566
3 changed files with 39 additions and 17 deletions
|
|
@ -35,6 +35,8 @@ namespace Dalamud
|
|||
public bool ToggleUiHideDuringCutscenes { get; set; } = true;
|
||||
public bool ToggleUiHideDuringGpose { get; set; } = true;
|
||||
|
||||
public bool PrintPluginsWelcomeMsg { get; set; } = true;
|
||||
|
||||
[JsonIgnore]
|
||||
public string ConfigPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -211,13 +211,14 @@ namespace Dalamud.Game {
|
|||
|
||||
this.dalamud.Framework.Gui.Chat.Print(string.Format(Loc.Localize("DalamudWelcome", "Dalamud vD{0} loaded."), assemblyVersion));
|
||||
|
||||
foreach (var plugin in this.dalamud.PluginManager.Plugins)
|
||||
if (this.dalamud.Configuration.PrintPluginsWelcomeMsg)
|
||||
{
|
||||
this.dalamud.Framework.Gui.Chat.Print(string.Format(Loc.Localize("DalamudPluginLoaded", " 》 {0} v{1} loaded."), plugin.Plugin.Name, plugin.Plugin.GetType().Assembly.GetName().Version));
|
||||
foreach (var plugin in this.dalamud.PluginManager.Plugins)
|
||||
{
|
||||
this.dalamud.Framework.Gui.Chat.Print(string.Format(Loc.Localize("DalamudPluginLoaded", " 》 {0} v{1} loaded."), plugin.Plugin.Name, plugin.Plugin.GetType().Assembly.GetName().Version));
|
||||
}
|
||||
}
|
||||
|
||||
this.hasSeenLoadingMsg = true;
|
||||
|
||||
if (string.IsNullOrEmpty(this.dalamud.Configuration.LastVersion) || !assemblyVersion.StartsWith(this.dalamud.Configuration.LastVersion))
|
||||
{
|
||||
this.dalamud.Framework.Gui.Chat.PrintChat(new XivChatEntry
|
||||
|
|
@ -249,6 +250,8 @@ namespace Dalamud.Game {
|
|||
{
|
||||
Log.Error(e, Loc.Localize("DalamudPluginUpdateCheckFail", "Could not check for plugin updates."));
|
||||
}
|
||||
|
||||
this.hasSeenLoadingMsg = true;
|
||||
}
|
||||
|
||||
private static SeString MakeItalics(string text) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ namespace Dalamud.Interface
|
|||
this.doPluginTest = this.dalamud.Configuration.DoPluginTest;
|
||||
this.doDalamudTest = this.dalamud.Configuration.DoDalamudTest;
|
||||
|
||||
this.printPluginsWelcomeMsg = this.dalamud.Configuration.PrintPluginsWelcomeMsg;
|
||||
|
||||
this.languages = Localization.ApplicableLangCodes.Prepend("en").ToArray();
|
||||
try {
|
||||
if (string.IsNullOrEmpty(this.dalamud.Configuration.LanguageOverride)) {
|
||||
|
|
@ -66,6 +68,8 @@ namespace Dalamud.Interface
|
|||
private bool doToggleUiHideDuringCutscenes;
|
||||
private bool doToggleUiHideDuringGpose;
|
||||
|
||||
private bool printPluginsWelcomeMsg;
|
||||
|
||||
#region Experimental
|
||||
|
||||
private bool doPluginTest;
|
||||
|
|
@ -102,48 +106,56 @@ namespace Dalamud.Interface
|
|||
ImGui.Dummy(new Vector2(5f, 5f) * ImGui.GetIO().FontGlobalScale);
|
||||
|
||||
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.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsFlashHint", "Flash the FFXIV window in your task bar when a duty is ready."));
|
||||
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingsDutyFinderMessage", "Chatlog message on duty pop"), ref this.doCfChatMessage);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsDutyFinderMessageHint", "Select, if a message should be sent in the FFXIV chat when a duty is ready."));
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsDutyFinderMessageHint", "Send a message in FFXIV chat when a duty is ready."));
|
||||
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingsPrintPluginsWelcomeMsg", "Display loaded plugins in the welcome message"), ref this.printPluginsWelcomeMsg);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsPrintPluginsWelcomeMsgHint", "Display loaded plugins in FFXIV chat when logging in with a character."));
|
||||
|
||||
ImGui.EndTabItem();
|
||||
}
|
||||
|
||||
if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsVisual", "Look & Feel"))) {
|
||||
if (ImGui.DragFloat(Loc.Localize("DalamudSettingsGlobalUiScale", "Global UI scale"), ref this.globalUiScale, 0.005f, MinScale, MaxScale, "%.2f"))
|
||||
ImGui.Text(Loc.Localize("DalamudSettingsGlobalUiScale", "Global UI Scale"));
|
||||
if (ImGui.DragFloat("##DalamudSettingsGlobalUiScaleDrag", ref this.globalUiScale, 0.005f, MinScale, MaxScale, "%.2f"))
|
||||
ImGui.GetIO().FontGlobalScale = this.globalUiScale;
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button("Reset")) {
|
||||
this.globalUiScale = 1.0f;
|
||||
ImGui.GetIO().FontGlobalScale = this.globalUiScale;
|
||||
}
|
||||
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsGlobalUiScaleHint", "Scale all XIVLauncher UI elements - useful for 4K displays."));
|
||||
|
||||
ImGui.Dummy(new Vector2(10f, 16f) * ImGui.GetIO().FontGlobalScale);
|
||||
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideOptOutNote", "Plugins may independently opt out of the settings below."));
|
||||
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingToggleUiHide", "Hide plugin UI when the game UI is toggled off."), ref this.doToggleUiHide);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideHint", "Check this box to hide any open windows by plugins when toggling the game overlay."));
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingToggleUiHide", "Hide plugin UI when the game UI is toggled off"), ref this.doToggleUiHide);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideHint", "Hide any open windows by plugins when toggling the game overlay."));
|
||||
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingToggleUiHideDuringCutscenes", "Hide plugin UI during cutscenes."), ref this.doToggleUiHideDuringCutscenes);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideDuringCutscenesHint", "Check this box to hide any open windows by plugins during cutscenes."));
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingToggleUiHideDuringCutscenes", "Hide plugin UI during cutscenes"), ref this.doToggleUiHideDuringCutscenes);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideDuringCutscenesHint", "Hide any open windows by plugins during cutscenes."));
|
||||
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingToggleUiHideDuringGpose", "Hide plugin UI while gpose is active."), ref this.doToggleUiHideDuringGpose);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideDuringGposeHint", "Check this box to hide any open windows by plugins while gpose is active."));
|
||||
ImGui.Checkbox(Loc.Localize("DalamudSettingToggleUiHideDuringGpose", "Hide plugin UI while gpose is active"), ref this.doToggleUiHideDuringGpose);
|
||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingToggleUiHideDuringGposeHint", "Hide any open windows by plugins while gpose is active."));
|
||||
|
||||
ImGui.EndTabItem();
|
||||
}
|
||||
|
||||
if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsExperimental", "Experimental")))
|
||||
{
|
||||
if (ImGui.BeginTabItem(Loc.Localize("DalamudSettingsExperimental", "Experimental"))) {
|
||||
ImGui.Text(Loc.Localize("DalamudSettingsRestartHint", "You need to restart your game after changing these settings."));
|
||||
|
||||
ImGui.Dummy(new Vector2(10f, 10f) * ImGui.GetIO().FontGlobalScale);
|
||||
|
||||
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.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsPluginTestHint", "Receive testing prereleases for plugins."));
|
||||
|
||||
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.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingDalamudTestHint", "Receive testing prereleases for Dalamud."));
|
||||
|
||||
ImGui.EndTabItem();
|
||||
}
|
||||
|
|
@ -153,6 +165,9 @@ namespace Dalamud.Interface
|
|||
|
||||
ImGui.EndChild();
|
||||
|
||||
if (!isOpen) {
|
||||
ImGui.GetIO().FontGlobalScale = this.dalamud.Configuration.GlobalUiScale;
|
||||
}
|
||||
if (ImGui.Button(Loc.Localize("Save", "Save"))) {
|
||||
Save();
|
||||
}
|
||||
|
|
@ -184,6 +199,8 @@ namespace Dalamud.Interface
|
|||
this.dalamud.Configuration.DoPluginTest = this.doPluginTest;
|
||||
this.dalamud.Configuration.DoDalamudTest = this.doDalamudTest;
|
||||
|
||||
this.dalamud.Configuration.PrintPluginsWelcomeMsg = this.printPluginsWelcomeMsg;
|
||||
|
||||
this.dalamud.Configuration.Save();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue