/// <summary> /// Constructor /// </summary> /// <param name="hierarchy">Hierarchy of GUI.</param> /// <param name="sortOrders">Sort order for GUI hierarchy from root.</param> /// <param name="parent">Parent in GUI.</param> public GuiHierarchy(string hierarchy, int[] sortOrders, GuiHierarchy parent = null) { this.parent = parent; this.sortOrders = (sortOrders == null || sortOrders.Length <= 0) ? new int[] { DefaultSortOrder } : sortOrders; this.hierarchy = (hierarchy.TrimEnd(HierarchySeparator) + HierarchySeparator).TrimStart(HierarchySeparator); }
public PrefsFloatSlider(string key, float minValue, float maxValue, float defaultValue = default(float), GuiHierarchy hierarchy = null, string guiLabel = "") : this(key, defaultValue, hierarchy, guiLabel) { this.min = minValue; this.max = maxValue; }
public PrefsFloatSlider(string key, float minValue, float maxValue, float defaultValue = default(float), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <float, PrefsGuiNumericSliderDecimal> > onCreatedGui = null) : this(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { this.min = minValue; this.max = maxValue; }
public PrefsIntSlider(string key, int minValue, int maxValue, int defaultValue = default(int), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <int, PrefsGuiNumericSliderInteger> > onCreatedGui = null) : this(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { this.min = minValue; this.max = maxValue; }
public PrefsBase(string key, GuiHierarchy hierarchy = null, string guiLabel = "") { this.key = key; this.hierarchy = hierarchy; this.guiLabel = string.IsNullOrEmpty(guiLabel) == true?key.ToLabelable() : guiLabel; this.Register(); }
public PrefsBase(string key, GuiHierarchy hierarchy = null, string guiLabel = null) { this.key = key; this.hierarchy = hierarchy; this.guiLabel = guiLabel ?? key.ToLabelable(); this.Unsave = false; this.Regist(); }
private List <GuiHierarchy> GetParents() { var parents = new List <GuiHierarchy>(); var parent = this.Parent; while (parent != null) { parents.Insert(0, parent); parent = parent.Parent; } return(parents); }
public PrefsEnum(string key, T defaultValue = default(T), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, 0, hierarchy, guiLabel) { var type = typeof(T); if (type.IsEnum == false) { throw new ArgumentException(nameof(T) + " must be an enumerated type"); } this.enumType = type; this.defaultValue = Convert.ToInt32(defaultValue); }
public PrefsEnum(string key, T defaultValue = default(T), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <int, PrefsGuiEnum> > onCreatedGui = null) : base(key, 0, hierarchy, guiLabel, onCreatedGui) { var type = typeof(T); if (type.IsEnum == false) { throw new ArgumentException(nameof(T) + " must be an enumerated type"); } this.enumType = type; this.defaultValue = Convert.ToInt32(defaultValue); }
public PrefsColor(string key, Color defaultValue = default(Color), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public static void RemoveGuiHierarchy(GuiHierarchy hierarchy) => PrefsGuis?.RemoveCategory(hierarchy);
public PrefsIntSlider(string key, int defaultValue = default(int), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public PrefsExtends(string key, ValType defaultValue = default(ValType), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { ; }
public PrefsString(string key, string defaultValue = "", GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public PrefsFloat(string key, float defaultValue = default(float), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <float, PrefsGuiNumericDecimal> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
public PrefsVector3(string key, Vector3 defaultValue = default(Vector3), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public PrefsButton(string key, UnityAction action, GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, action ?? delegate { }, hierarchy, guiLabel) { }
public PrefsGuiConnector(string key, ValType defaultValue = default(ValType), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public PrefsBool(string key, bool defaultValue = default(bool), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public PrefsInt(string key, int defaultValue = default(int), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <int, PrefsGuiNumericInteger> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
public PrefsString(string key, string defaultValue = "", GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <string, PrefsGuiString> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
public PrefsRect(string key, Rect defaultValue = default(Rect), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <Rect, PrefsGuiRect> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
public PrefsValueBase(string key, ValType defaultValue = default(ValType), GuiHierarchy hierarchy = null, string guiLabel = null) : base(key, hierarchy, guiLabel) { this.value = defaultValue; this.defaultValue = defaultValue; }
public PrefsColorSlider(string key, Color defaultValue = default(Color), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <Color, PrefsGuiColorSlider> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
public PrefsGuiConnector(string key, ValType defaultValue = default(ValType), GuiHierarchy hierarchy = null, string guiLabel = null, Action <PrefsGuiBaseConnector <ValType, GuiType> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
/// <summary> /// Constructor /// </summary> /// <param name="hierarchy">Hierarchy of GUI.</param> /// <param name="sortOrder">Sort order for GUI hierarchy</param> /// <param name="parent">Parent in GUI.</param> public GuiHierarchy(string hierarchy, int sortOrder = DefaultSortOrder, GuiHierarchy parent = null) : this(hierarchy, new int[] { sortOrder }, parent) { ; }
public PrefsFloatSlider(string key, float defaultValue = default(float), GuiHierarchy hierarchy = null, string guiLabel = "") : base(key, defaultValue, hierarchy, guiLabel) { }
public PrefsButton(string key, UnityAction action, GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <UnityAction, GuiButton> > onCreatedGui = null) : base(key, action ?? delegate { }, hierarchy, guiLabel, onCreatedGui) { }
public PrefsVector2Int(string key, Vector2Int defaultValue = default(Vector2Int), GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <Vector2Int, PrefsGuiVector2Int> > onCreatedGui = null) : base(key, defaultValue, hierarchy, guiLabel, onCreatedGui) { }
public PrefsLabel(string key, string text, GuiHierarchy hierarchy = null, string guiLabel = null, Action <Prefs.PrefsGuiBaseConnector <string, PrefsGuiLabel> > onCreatedGui = null) : base(key, text ?? "", hierarchy, guiLabel, onCreatedGui) { }