protected override void InitilizeRootEditorGUIElement(EditorGUIElement_Container_Auto root, EditTarget target) { root.AddChild(new EditorGUIElement_Complex_EditTarget(target)); SpriteVectorizer sprite_vectorizer; if (target.TryGetObject <SpriteVectorizer>(out sprite_vectorizer)) { root.AddChild(new EditorGUIElement_SpriteVectorizerTest(sprite_vectorizer)); } }
static public T AddChildWithAttachments <T>(this EditorGUIElement_Container_Auto item, T child, IEnumerable <EditorGUIElementAttachment> attachments) where T : EditorGUIElement { item.AddChild(child); child.AddAttachments(attachments); return(child); }
protected override EditorGUIElement PushState() { EditorGUIElement_Container_Auto container = new EditorGUIElement_Container_Auto_Simple_VerticalStrip(); if (target.IsValid()) { if (target.IsSerializationNotCorrupt()) { container.AddChildren( target.GetPropertys() .Convert(p => p.CreateLabeledEditorGUIElement()) ); container.AddChildren( target.GetDisplays() .Convert(d => d.CreateLabeledEditorGUIElement()) ); container.AddChildren( target.GetFunctions() .Convert(f => f.CreateEditorGUIElement()) ); container.AddChildren( target.GetActions() .Convert(a => a.CreateEditorGUIElement()) ); } if (target.IsSerializationCorrupt() || GetLayoutState().ShouldAlwaysShowRecoveryFields()) { EditorGUIElement_Container_Auto recovery_container = container.AddChild(new EditorGUIElement_Container_Auto_Simple_VerticalStrip()); if (target.IsSerializationCorrupt()) { recovery_container.AddChild(new EditorGUIElement_Text("!Corruption Detected!")); recovery_container.AddAttachment(new EditorGUIElementAttachment_Box(Color.red)); } else { recovery_container.AddAttachment(new EditorGUIElementAttachment_Box(Color.blue)); } recovery_container.AddChildren( target.GetRecoveryPropertys() .Convert(p => p.CreateLabeledEditorGUIElement()) ); recovery_container.AddChildren( target.GetRecoveryActions() .Convert(a => a.CreateEditorGUIElement()) ); } } return(container); }
protected override void InitializeRootEditorGUIElement(EditorGUIElement_Container_Auto root) { root.AddChild(new EditorGUIElement_Complex_EditTarget(new EditTarget(Painter.GetInstance()))); }
protected override void InitilizeRootEditorGUIElement(EditorGUIElement_Container_Auto root, EditTarget target) { root.AddChild(new EditorGUIElement_Complex_EditTarget(target)); }