protected static void PushStringSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, string defaultVal, Func <string, string> translator = null, string maskerName = "", Func <SettingBase, bool> maskingEvaluator = null) { SettingBase newSetting = new StrSetting( scope, protectionLevel, label, name, defaultVal, translator: translator); settings.Add(newSetting); nameSettingsMap.Add(name, newSetting); if (!string.IsNullOrEmpty(maskerName)) { AddToMaskerMap(maskerName, name, maskingEvaluator); } }
public IntSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, int defaultVal = 0, int minVal = int.MinValue, int maxVal = int.MaxValue, Func <int, string> translator = null, string postFix = "", bool dropdown = false) : base( scope: scope, protectionLevel: protectionLevel, label: label, name: name) { this.defaultVal = defaultVal; this.minVal = minVal; this.maxVal = maxVal; this.translator = translator; this.postFix = postFix; this.dropdown = dropdown; }
protected static void PushFloatSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, float defaultVal, float minVal = float.MinValue, float maxVal = float.MaxValue, Func <float, string> translator = null, string postFix = "", string maskerName = "", Func <SettingBase, bool> maskingEvaluator = null) { SettingBase newSetting = new FloatSetting( scope, protectionLevel, label, name, defaultVal, minVal: minVal, maxVal: maxVal, translator: translator, postFix: postFix); settings.Add(newSetting); nameSettingsMap.Add(name, newSetting); if (!string.IsNullOrEmpty(maskerName)) { AddToMaskerMap(maskerName, name, maskingEvaluator); } }
protected ColorSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name) : base( scope: scope, protectionLevel: protectionLevel, label: label, name: name) { }
protected SettingBase( SettingScope scope, SettingProtection protectionLevel, string label, string name) { this.scope = scope; this.protectionLevel = protectionLevel; this.label = label; this.name = name; tmpNewValue = ""; nameDirty = false; }
public BoolSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, bool defaultVal = false) : base( scope: scope, protectionLevel: protectionLevel, label: label, name: name) { this.defaultVal = defaultVal; }
public SettingColorSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, Color defaultVal) : base( scope: scope, protectionLevel: protectionLevel, label: label, name: name) { this.defaultVal = defaultVal; }
public StrSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, string defaultVal = "", Func <string, string> translator = null) : base( scope: scope, protectionLevel: protectionLevel, label: label, name: name) { this.defaultVal = defaultVal; this.translator = translator; }
public FloatSetting( SettingScope scope, SettingProtection protectionLevel, string label, string name, float defaultVal = 0, float minVal = float.MinValue, float maxVal = float.MaxValue, Func <float, string> translator = null, string postFix = "") : base( scope: scope, protectionLevel: protectionLevel, label: label, name: name) { this.defaultVal = defaultVal; this.minVal = minVal; this.maxVal = maxVal; this.postFix = postFix; this.translator = translator; }