public FuzzyFuncOption(FuzzyFunc <T> func, string label, Func <EditorTexture> getIcon = null, string summary = null) : base(FuzzyOptionMode.Leaf)
 {
     Ensure.That(nameof(func)).IsNotNull(func);
     this.func     = func;
     value         = Convert;
     this.label    = label;
     this.getIcon  = getIcon;
     documentation = new LambdaFuzzyOptionDocumentation(summary);
 }
Esempio n. 2
0
        public FactoryOption(IFactory factory, IFactoryConfiguration configuration = null, bool showNewIcon = true) : base(FuzzyOptionMode.Leaf)
        {
            Ensure.That(nameof(factory)).IsNotNull(factory);

            value              = Func;
            this.factory       = factory;
            this.configuration = configuration;
            label              = $"New {factory.label}";
            this.showNewIcon   = showNewIcon;
            documentation      = new LambdaFuzzyOptionDocumentation(factory.description);
            zoom = true;
        }