Ejemplo n.º 1
0
        void InitializeSettings()
        {
            // Initialize settings button:
            if (hasSettings)
            {
                CreateSettingButton();
                settingsContainer         = new NodeSettingsView();
                settingsContainer.visible = false;
                settings = new VisualElement();
                // Add Node type specific settings
                settings.Add(CreateSettingsView());
                settingsContainer.Add(settings);
                Add(settingsContainer);

                var fields = nodeTarget.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);

                foreach (var field in fields)
                {
                    if (field.GetCustomAttribute(typeof(SettingAttribute)) != null)
                    {
                        AddSettingField(field);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 void InitializeSettings()
 {
     // Initialize settings button:
     if (hasSettings)
     {
         CreateSettingButton();
         settingsContainer         = new NodeSettingsView();
         settingsContainer.visible = false;
         settingsContainer.Add(settings);
         Add(settingsContainer);
     }
 }
Ejemplo n.º 3
0
 void InitializeSettings()
 {
     // Initialize settings button:
     if (hasSettings)
     {
         CreateSettingButton();
         settingsContainer         = new NodeSettingsView();
         settingsContainer.visible = false;
         settings = new VisualElement();
         // Add Node type specific settings
         settings.Add(CreateSettingsView());
         settingsContainer.Add(settings);
         Add(settingsContainer);
     }
 }