diff --git a/CustomizePlus/Core/Services/Dalamud/DalamudBranchService.cs b/CustomizePlus/Core/Services/Dalamud/DalamudBranchService.cs index e2ec452..70f6e75 100644 --- a/CustomizePlus/Core/Services/Dalamud/DalamudBranchService.cs +++ b/CustomizePlus/Core/Services/Dalamud/DalamudBranchService.cs @@ -9,7 +9,7 @@ public class DalamudBranchService : IService /// Message used in various places to tell user why the plugin is disabled /// public const string PluginDisabledMessage = "You are running development or testing version of Dalamud.\n" + - "Regular users are not supposed to run Customize+ on non-release versions of Dalamud therefore Customize+ has disabled itself."; + "Regular users are not supposed to run Customize+ on non-release versions of Dalamud therefore Customize+ has disabled itself until you go back to stable version."; /// /// Current Dalamud branch diff --git a/CustomizePlus/Core/Services/UserNotifierService.cs b/CustomizePlus/Core/Services/UserNotifierService.cs index 331ca73..e4e1e52 100644 --- a/CustomizePlus/Core/Services/UserNotifierService.cs +++ b/CustomizePlus/Core/Services/UserNotifierService.cs @@ -54,8 +54,8 @@ public class UserNotifierService : IDisposable if (displayOptionalMessages) { - UIGlobals.PlayChatSoundEffect(11); - _popupSystem.ShowPopup(PopupSystem.Messages.PluginDisabledNonReleaseDalamud); + if(_popupSystem.ShowPopup(PopupSystem.Messages.PluginDisabledNonReleaseDalamud)) + UIGlobals.PlayChatSoundEffect(11); } } } diff --git a/CustomizePlus/UI/Windows/PopupSystem.Messages.cs b/CustomizePlus/UI/Windows/PopupSystem.Messages.cs index bdc0be3..f8b7468 100644 --- a/CustomizePlus/UI/Windows/PopupSystem.Messages.cs +++ b/CustomizePlus/UI/Windows/PopupSystem.Messages.cs @@ -47,7 +47,7 @@ public partial class PopupSystem RegisterPopup(Messages.ClipboardDataUnsupported, "Clipboard data you are trying to use cannot be used in this version of Customize+."); RegisterPopup(Messages.ClipboardDataNotLongTerm, "Warning: clipboard data is not designed to be used as long-term way of storing your templates.\nCompatibility of copied data between different Customize+ versions is not guaranteed.", true, new Vector2(5, 10)); - - RegisterPopup(Messages.PluginDisabledNonReleaseDalamud, DalamudBranchService.PluginDisabledMessage, false, new Vector2(5, 8)); + + RegisterPopup(Messages.PluginDisabledNonReleaseDalamud, DalamudBranchService.PluginDisabledMessage + "\nThis window will not be shown again.", true, new Vector2(5, 8)); } } diff --git a/CustomizePlus/UI/Windows/PopupSystem.cs b/CustomizePlus/UI/Windows/PopupSystem.cs index 732a29a..b525df9 100644 --- a/CustomizePlus/UI/Windows/PopupSystem.cs +++ b/CustomizePlus/UI/Windows/PopupSystem.cs @@ -38,7 +38,10 @@ public partial class PopupSystem _logger.Debug($"Popup \"{name}\" registered"); } - public void ShowPopup(string name) + /// + /// Show popup. Returns false if popup will not be shown for some reason. (can only be shown once or awaiting to be shown) + /// + public bool ShowPopup(string name) { name = name.ToLowerInvariant(); @@ -47,12 +50,14 @@ public partial class PopupSystem var popup = _popups[name]; - if (popup.DisplayRequested || _configuration.UISettings.ViewedMessageWindows.Contains(name)) - return; + if (popup.DisplayRequested || (popup.DisplayOnce && _configuration.UISettings.ViewedMessageWindows.Contains(name))) + return false; popup.DisplayRequested = true; //_logger.Debug($"Popup \"{name}\" set as requested to be displayed"); + + return true; } public void Draw()