mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
feat: settings window rework
This commit is contained in:
parent
0dc58cce56
commit
bc3dcdfad7
22 changed files with 1724 additions and 1084 deletions
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using CheapLoc;
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Internal.Windows.PluginInstaller;
|
||||
using Dalamud.Interface.Internal.Windows.Settings.Widgets;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Utility;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Settings.Tabs;
|
||||
|
||||
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Internals")]
|
||||
public class SettingsTabExperimental : SettingsTab
|
||||
{
|
||||
public override SettingsEntry[] Entries { get; } =
|
||||
{
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize("DalamudSettingsPluginTest", "Get plugin testing builds"),
|
||||
string.Format(
|
||||
Loc.Localize("DalamudSettingsPluginTestHint", "Receive testing prereleases for selected plugins.\nTo opt-in to testing builds for a plugin, you have to right click it in the \"{0}\" tab of the plugin installer and select \"{1}\"."),
|
||||
PluginCategoryManager.Locs.Group_Installed,
|
||||
PluginInstallerWindow.Locs.PluginContext_TestingOptIn),
|
||||
c => c.DoPluginTest,
|
||||
(v, c) => c.DoPluginTest = v),
|
||||
new HintSettingsEntry(
|
||||
Loc.Localize("DalamudSettingsPluginTestWarning", "Testing plugins may not have been vetted before being published. Please only enable this if you are aware of the risks."),
|
||||
ImGuiColors.DalamudRed),
|
||||
|
||||
new GapSettingsEntry(5),
|
||||
|
||||
new ButtonSettingsEntry(
|
||||
Loc.Localize("DalamudSettingsClearHidden", "Clear hidden plugins"),
|
||||
Loc.Localize("DalamudSettingsClearHiddenHint", "Restore plugins you have previously hidden from the plugin installer."),
|
||||
() =>
|
||||
{
|
||||
Service<DalamudConfiguration>.Get().HiddenPluginInternalName.Clear();
|
||||
Service<PluginManager>.Get().RefilterPluginMasters();
|
||||
}),
|
||||
|
||||
new GapSettingsEntry(5, true),
|
||||
|
||||
new DevPluginsSettingsEntry(),
|
||||
|
||||
new GapSettingsEntry(5, true),
|
||||
|
||||
new ThirdRepoSettingsEntry(),
|
||||
};
|
||||
|
||||
public override string Title => Loc.Localize("DalamudSettingsExperimental", "Experimental");
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
base.Draw();
|
||||
|
||||
ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, "Total memory used by Dalamud & Plugins: " + Util.FormatBytes(GC.GetTotalMemory(false)));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue