mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
67 lines
1.6 KiB
C#
67 lines
1.6 KiB
C#
using Dalamud.Utility.Internal;
|
|
|
|
namespace Dalamud.Interface.Internal.Windows.Settings;
|
|
|
|
/// <summary>
|
|
/// Basic, drawable settings entry.
|
|
/// </summary>
|
|
internal abstract class SettingsEntry
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the public, searchable name of this settings entry.
|
|
/// </summary>
|
|
public LazyLoc Name { get; protected set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether this entry is valid.
|
|
/// </summary>
|
|
public virtual bool IsValid { get; protected set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether 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>
|
|
/// Called after the draw function and when the style overrides are removed.
|
|
/// </summary>
|
|
public virtual void PostDraw()
|
|
{
|
|
}
|
|
|
|
/// <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
|
|
}
|
|
}
|