add toggle to hide server info messages
This commit is contained in:
@@ -79,6 +79,7 @@ public class Configuration : IPluginConfiguration
|
|||||||
public bool InitialScanComplete { get; set; } = false;
|
public bool InitialScanComplete { get; set; } = false;
|
||||||
|
|
||||||
public bool FullPause { get; set; } = false;
|
public bool FullPause { get; set; } = false;
|
||||||
|
public bool HideInfoMessages { get; set; } = false;
|
||||||
public Dictionary<string, Dictionary<string, string>> UidServerComments { get; set; } = new(StringComparer.Ordinal);
|
public Dictionary<string, Dictionary<string, string>> UidServerComments { get; set; } = new(StringComparer.Ordinal);
|
||||||
public Dictionary<string, Dictionary<string, string>> GidServerComments { get; set; } = new(StringComparer.Ordinal);
|
public Dictionary<string, Dictionary<string, string>> GidServerComments { get; set; } = new(StringComparer.Ordinal);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>0.5.22</Version>
|
<Version>0.5.23</Version>
|
||||||
<Description></Description>
|
<Description></Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class SettingsUi : Window, IDisposable
|
|||||||
private bool? _notesSuccessfullyApplied = null;
|
private bool? _notesSuccessfullyApplied = null;
|
||||||
private string _lastTab = string.Empty;
|
private string _lastTab = string.Empty;
|
||||||
private bool _openPopupOnAddition;
|
private bool _openPopupOnAddition;
|
||||||
|
private bool _hideInfoMessages;
|
||||||
|
|
||||||
public SettingsUi(WindowSystem windowSystem,
|
public SettingsUi(WindowSystem windowSystem,
|
||||||
UiShared uiShared, Configuration configuration, ApiController apiController) : base("Mare Synchronos Settings")
|
UiShared uiShared, Configuration configuration, ApiController apiController) : base("Mare Synchronos Settings")
|
||||||
@@ -44,6 +45,7 @@ public class SettingsUi : Window, IDisposable
|
|||||||
_apiController = apiController;
|
_apiController = apiController;
|
||||||
_uiShared = uiShared;
|
_uiShared = uiShared;
|
||||||
_openPopupOnAddition = _configuration.OpenPopupOnAdd;
|
_openPopupOnAddition = _configuration.OpenPopupOnAdd;
|
||||||
|
_hideInfoMessages = _configuration.HideInfoMessages;
|
||||||
windowSystem.AddWindow(this);
|
windowSystem.AddWindow(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +165,12 @@ public class SettingsUi : Window, IDisposable
|
|||||||
_configuration.Save();
|
_configuration.Save();
|
||||||
}
|
}
|
||||||
UiShared.DrawHelpText("This will open a popup that allows you to set the notes for a user after successfully adding them to your individual pairs.");
|
UiShared.DrawHelpText("This will open a popup that allows you to set the notes for a user after successfully adding them to your individual pairs.");
|
||||||
|
if (ImGui.Checkbox("Hide Server Info Messages", ref _hideInfoMessages))
|
||||||
|
{
|
||||||
|
_configuration.HideInfoMessages = _hideInfoMessages;
|
||||||
|
_configuration.Save();
|
||||||
|
}
|
||||||
|
UiShared.DrawHelpText("Enabling this will not print any \"Info\" labeled messages into the game chat.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawAdministration()
|
private void DrawAdministration()
|
||||||
|
|||||||
@@ -234,7 +234,10 @@ public partial class ApiController
|
|||||||
break;
|
break;
|
||||||
case MessageSeverity.Information:
|
case MessageSeverity.Information:
|
||||||
Logger.Info(message);
|
Logger.Info(message);
|
||||||
_dalamudUtil.PrintInfoChat(message);
|
if (!_pluginConfiguration.HideInfoMessages)
|
||||||
|
{
|
||||||
|
_dalamudUtil.PrintInfoChat(message);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user