Exemple #1
0
                public ModOption create(Config.Field cfgField)
                {
                    if (cfgField.type != typeof(int) || !cfgField.checkAttr <ButtonAttribute>())                    // it's good enough for now
                    {
                        return(null);
                    }

                    return(new ButtonOption(cfgField, cfgField.getAttr <FieldAttribute>()?.label));
                }
 static ChoiceOption create(Config.Field cfgField, string label, string[] choices, object[] values)
 {
     if (cfgField.checkAttr <ChoiceMasterAttribute>())
     {
         return(new ChoiceMasterOption(cfgField, label, choices, values));
     }
     else
     {
         return(new ChoiceOption(cfgField, label, choices, values));
     }
 }