private static void EnsureInitialState(tkDatabaseContext context, fiGraphMetadata metadata)
        {
            if (context.editedList == null)
            {
                context.editedList = (IList)InspectedType.Get(typeof(TDerived)).CreateInstance();
            }

            TryEnsureValidIndex(context);

            // Set the global metadata to the graph metadata, as the graph metadata is persistent
            // but users still may want to access the global metadata.
            fiGlobalMetadata.Set(context.editedList, metadata.GetMetadata <InspectorDatabaseEditorMetadata>());

            // Disable the dropdown
            metadata.GetPersistentMetadata <fiDropdownMetadata>().ForceDisable();
        }
        private void DisableFoldouts(fiGraphMetadata metadata)
        {
            if (_showTopLevelFoldout == false)
            {
                metadata.GetPersistentMetadata <fiDropdownMetadata>().ForceDisable();
            }

            for (int i = 0; i < _editors.Count; ++i)
            {
                metadata.Enter(i).Metadata.GetPersistentMetadata <fiDropdownMetadata>().ForceDisable();
            }

            if (_showPrimary)
            {
                metadata.Enter("Primary").Metadata.GetPersistentMetadata <fiDropdownMetadata>().ForceDisable();
            }
        }
Пример #3
0
        private void DisableFoldouts(fiGraphMetadata metadata) {
            if (_showTopLevelFoldout == false) {
                metadata.GetPersistentMetadata<fiDropdownMetadata>().ForceDisable();
            }

            for (int i = 0; i < _editors.Count; ++i) {
                metadata.Enter(i).Metadata.GetPersistentMetadata<fiDropdownMetadata>().ForceDisable();
            }

            if (_showPrimary) {
                metadata.Enter("Primary").Metadata.GetPersistentMetadata<fiDropdownMetadata>().ForceDisable();
            }
        }
Пример #4
0
 private static void DisableFoldoutByDefault(object obj, fiGraphMetadata metadata)
 {
     metadata.GetPersistentMetadata <fiDropdownMetadata>().ForceDisable();
 }
Пример #5
0
 protected override tkControlEditor GetControlEditor(GUIContent label, fsData element, fiGraphMetadata graphMetadata)
 {
     graphMetadata.GetPersistentMetadata <fiDropdownMetadata>().ForceDisable();
     return(Editor);
 }