Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -26,6 +26,7 @@ public class MyGuiScreenPluginConfig : MyGuiScreenBase
|
||||
private const float Spacing = 0.0175f;
|
||||
|
||||
private static bool allItemsVisible = true;
|
||||
private static bool _hideLocalPlugins = true;
|
||||
|
||||
public readonly Dictionary<string, bool> AfterRebootEnableFlags = new();
|
||||
|
||||
@@ -349,14 +350,19 @@ public class MyGuiScreenPluginConfig : MyGuiScreenBase
|
||||
/// <param name="btn">The button to assign this event to.</param>
|
||||
private void OnVisibilityClick(MyGuiControlButton btn)
|
||||
{
|
||||
if (allItemsVisible)
|
||||
if (allItemsVisible && _hideLocalPlugins)
|
||||
{
|
||||
allItemsVisible = false;
|
||||
btn.Icon = IconShow;
|
||||
}
|
||||
else
|
||||
else if (_hideLocalPlugins)
|
||||
{
|
||||
allItemsVisible = true;
|
||||
_hideLocalPlugins = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_hideLocalPlugins = true;
|
||||
btn.Icon = IconHide;
|
||||
}
|
||||
|
||||
@@ -405,6 +411,8 @@ public class MyGuiScreenPluginConfig : MyGuiScreenBase
|
||||
foreach (var plugin in list)
|
||||
{
|
||||
var enabled = AfterRebootEnableFlags[plugin.Id];
|
||||
|
||||
if (plugin.IsLocal && _hideLocalPlugins) continue;
|
||||
|
||||
if (noFilter && (plugin.Hidden || !allItemsVisible) && !enabled)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user