Esempio n. 1
0
 private AddonOption(PawnRulesLink link, string key, OptionTarget target, OptionWidget widget, string label, string tooltip, Type type, object defaultValue, bool allowedInPreset)
 {
     Link            = link;
     Key             = key;
     Target          = target;
     Widget          = widget;
     Label           = label;
     Tooltip         = tooltip;
     Type            = type;
     DefaultValue    = defaultValue;
     AllowedInPreset = allowedInPreset;
 }
Esempio n. 2
0
        internal static OptionHandle <T> Add <T>(PawnRulesLink link, string key, OptionTarget target, OptionWidget widget, string label, string tooltip, T defaultValue, bool allowedInPreset = true)
        {
            var option = new AddonOption(link, link.ModContentPack.PackageId + "_" + key, target, widget, label, tooltip, typeof(T), defaultValue, allowedInPreset);

            AddonManager.Add(option);

            var handle = new OptionHandle <T>(option);

            option.Handle = handle;

            return(handle);
        }