Dalamud/Dalamud/Interface/Internal/Windows/Settings/SettingsEntry.cs
goat 448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00

58 lines
1.4 KiB
C#

namespace Dalamud.Interface.Internal.Windows.Settings;
/// <summary>
/// Basic, drawable settings entry.
/// </summary>
public abstract class SettingsEntry
{
/// <summary>
/// Gets or sets the public, searchable name of this settings entry.
/// </summary>
public string? Name { get; protected set; }
/// <summary>
/// Gets or sets a value indicating whether or not this entry is valid.
/// </summary>
public virtual bool IsValid { get; protected set; } = true;
/// <summary>
/// Gets or sets a value indicating whether or not this entry is visible.
/// </summary>
public virtual bool IsVisible { get; protected set; } = true;
/// <summary>
/// Gets the ID of this settings entry, used for ImGui uniqueness.
/// </summary>
protected Guid Id { get; } = Guid.NewGuid();
/// <summary>
/// Load this setting.
/// </summary>
public abstract void Load();
/// <summary>
/// Save this setting.
/// </summary>
public abstract void Save();
/// <summary>
/// Draw this setting control.
/// </summary>
public abstract void Draw();
/// <summary>
/// Function to be called when the tab is opened.
/// </summary>
public virtual void OnOpen()
{
// ignored
}
/// <summary>
/// Function to be called when the tab is closed.
/// </summary>
public virtual void OnClose()
{
// ignored
}
}