mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
New settings handling
This commit is contained in:
parent
fed4b54915
commit
8d49addd63
24 changed files with 309 additions and 233 deletions
30
Source/RJWSexperience/Settings/SettingsTab.cs
Normal file
30
Source/RJWSexperience/Settings/SettingsTab.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RJWSexperience.Settings
|
||||
{
|
||||
public abstract class SettingsTab : ITab, IResettable
|
||||
{
|
||||
protected readonly List<ISettingHandle> tabSettings;
|
||||
protected readonly Configurations settings;
|
||||
|
||||
public string Label { get; protected set; }
|
||||
|
||||
protected SettingsTab(Configurations settings, string label, List<ISettingHandle> tabSettings)
|
||||
{
|
||||
this.settings = settings;
|
||||
Label = label;
|
||||
this.tabSettings = tabSettings;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
foreach (ISettingHandle setting in tabSettings)
|
||||
{
|
||||
setting.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void DoTabContents(Rect inRect);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue