mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
feat: add plugin hiding
This commit is contained in:
parent
09e57f098f
commit
f0399d6af4
3 changed files with 20 additions and 1 deletions
|
|
@ -26,7 +26,8 @@ namespace Dalamud
|
||||||
|
|
||||||
public bool DoPluginTest { get; set; } = false;
|
public bool DoPluginTest { get; set; } = false;
|
||||||
public bool DoDalamudTest { get; set; } = false;
|
public bool DoDalamudTest { get; set; } = false;
|
||||||
public List<ThirdRepoSetting> ThirdRepoList { get; set; }= new List<ThirdRepoSetting>();
|
public List<ThirdRepoSetting> ThirdRepoList { get; set; } = new List<ThirdRepoSetting>();
|
||||||
|
public List<string> HiddenPluginInternalName { get; set; } = new List<string>();
|
||||||
|
|
||||||
public float GlobalUiScale { get; set; } = 1.0f;
|
public float GlobalUiScale { get; set; } = 1.0f;
|
||||||
public bool ToggleUiHide { get; set; } = true;
|
public bool ToggleUiHide { get; set; } = true;
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,14 @@ namespace Dalamud.Interface
|
||||||
|
|
||||||
ImGui.Dummy(new Vector2(12f, 12f) * ImGui.GetIO().FontGlobalScale);
|
ImGui.Dummy(new Vector2(12f, 12f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
|
if (ImGui.Button(Loc.Localize("DalamudSettingsClearHidden", "Clear hidden plugins")))
|
||||||
|
this.dalamud.Configuration.HiddenPluginInternalName.Clear();
|
||||||
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingsClearHiddenHint", "Restore plugins you have previously hidden from the plugin installer."));
|
||||||
|
|
||||||
|
ImGui.Dummy(new Vector2(12f, 12f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
|
ImGui.Dummy(new Vector2(12f, 12f) * ImGui.GetIO().FontGlobalScale);
|
||||||
|
|
||||||
ImGui.Text(Loc.Localize("DalamudSettingsCustomRepo", "Custom Plugin Repositories"));
|
ImGui.Text(Loc.Localize("DalamudSettingsCustomRepo", "Custom Plugin Repositories"));
|
||||||
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingCustomRepoHint", "Add custom plugin repositories. Only change these settings if you know what you are doing."));
|
ImGui.TextColored(this.hintTextColor, Loc.Localize("DalamudSettingCustomRepoHint", "Add custom plugin repositories. Only change these settings if you know what you are doing."));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,9 @@ namespace Dalamud.Plugin
|
||||||
if (pluginDefinition.DalamudApiLevel < PluginManager.DALAMUD_API_LEVEL)
|
if (pluginDefinition.DalamudApiLevel < PluginManager.DALAMUD_API_LEVEL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (this.dalamud.Configuration.HiddenPluginInternalName.Contains(pluginDefinition.InternalName))
|
||||||
|
continue;
|
||||||
|
|
||||||
didAny = true;
|
didAny = true;
|
||||||
|
|
||||||
if (hasSearchString &&
|
if (hasSearchString &&
|
||||||
|
|
@ -451,6 +454,13 @@ namespace Dalamud.Plugin
|
||||||
ImGui.Unindent();
|
ImGui.Unindent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.BeginPopupContextItem("item context menu"))
|
||||||
|
{
|
||||||
|
if (ImGui.Selectable("Hide from installer"))
|
||||||
|
this.dalamud.Configuration.HiddenPluginInternalName.Add(pluginDefinition.InternalName);
|
||||||
|
ImGui.EndPopup();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.PopID();
|
ImGui.PopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue