public void OnGUI() { using (new EditorGUILayout.VerticalScope("box")) { tab = GUILayout.Toolbar(tab, new string[] { "GIT", "ARE", "IFO" }); switch (tab) { case 0: curData = AuroraEngine.Resources.data.module.git; break; case 1: curData = AuroraEngine.Resources.data.module.are; break; case 2: curData = AuroraEngine.Resources.data.module.ifo; break; } if (curData != null) { using (var scroll = new EditorGUILayout.ScrollViewScope(scrollPos)) { scrollPos = scroll.scrollPosition; GFFEditor.DrawStruct(curData); } } } }
void LeftSidebar() { using (new EditorGUILayout.VerticalScope(GUILayout.Width(300))) { if (GUILayout.Button("Back to start")) { BackToStart(); } if (GUILayout.Button("New Response")) { NewResponse(); } if (GUILayout.Button("Unlink response")) { UnlinkResponse(); } if (GUILayout.Button("Copy selected")) { CopySelected(); } if (GUILayout.Button("Paste into selected")) { PasteIntoSelected(); } if (GUILayout.Button("Move selected up")) { MoveSelectedUp(); } if (GUILayout.Button("Move selected down")) { MoveSelectedDown(); } // Debug information, for now if (curEntry != null) { GUILayout.Label("Entry: " + curEntry.ToString()); } if (curReply != null) { GUILayout.Label("Reply: " + curReply.ToString()); } using (var scroll = new EditorGUILayout.ScrollViewScope(leftScroll)) { leftScroll = scroll.scrollPosition; // Show the inspector for the currently selected link if (curEditingLink != null) { GFFEditor.DrawStruct(curEditingLink); } } } }
void DrawEditor() { // Draw the GFF editor for the selected item using (new EditorGUILayout.VerticalScope()) { using (var scroll = new EditorGUILayout.ScrollViewScope(editorScroll)) { editorScroll = scroll.scrollPosition; GFFEditor.DrawStruct(selected); } } }
void RightSidebar() { using (new EditorGUILayout.VerticalScope(GUILayout.Width(300))) { using (var scroll = new EditorGUILayout.ScrollViewScope(rightScroll)) { rightScroll = scroll.scrollPosition; // Show the inspector for the currently selected entry/reply if (curEditingLink != null) { GFFEditor.DrawStruct(curEditing); } } } }
public override void OnInspectorGUI() { GFFEditor.DrawStruct(((AuroraInstance)target).gitData); }