mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +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 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 bool ToggleUiHide { get; set; } = true;
|
||||
|
|
|
|||
|
|
@ -189,6 +189,14 @@ namespace Dalamud.Interface
|
|||
|
||||
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.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)
|
||||
continue;
|
||||
|
||||
if (this.dalamud.Configuration.HiddenPluginInternalName.Contains(pluginDefinition.InternalName))
|
||||
continue;
|
||||
|
||||
didAny = true;
|
||||
|
||||
if (hasSearchString &&
|
||||
|
|
@ -451,6 +454,13 @@ namespace Dalamud.Plugin
|
|||
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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue