mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Removed toolbar.
It might return later, but at this point there's no use for it.
This commit is contained in:
parent
bc5c060dee
commit
2bccb2ca3a
@ -15,7 +15,6 @@ public partial class NodeEditorWindow {
|
||||
DrawConnections();
|
||||
DrawDraggedConnection();
|
||||
DrawNodes();
|
||||
DrawToolbar();
|
||||
|
||||
GUI.matrix = m;
|
||||
}
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
public partial class NodeEditorWindow {
|
||||
|
||||
public void DrawToolbar() {
|
||||
EditorGUILayout.BeginHorizontal("Toolbar");
|
||||
|
||||
if (DropdownButton("File", 50)) FileContextMenu();
|
||||
if (DropdownButton("Edit", 50)) EditContextMenu();
|
||||
if (DropdownButton("View", 50)) { }
|
||||
if (DropdownButton("Settings", 70)) { }
|
||||
if (DropdownButton("Tools", 50)) ToolsContextMenu();
|
||||
|
||||
//Draw hover info
|
||||
if (Event.current.type == EventType.Layout || Event.current.type == EventType.Repaint) {
|
||||
if (IsHoveringNode) {
|
||||
GUILayout.Space(20);
|
||||
string hoverInfo = hoveredNode.GetType().ToString();
|
||||
if (IsHoveringPort) hoverInfo += " > " + hoveredPort.fieldName;
|
||||
GUILayout.Label(hoverInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Make the toolbar extend all throughout the window extension.
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public void FileContextMenu() {
|
||||
GenericMenu contextMenu = new GenericMenu();
|
||||
|
||||
contextMenu.AddItem(new GUIContent("Save"), false, Save);
|
||||
contextMenu.AddItem(new GUIContent("Save As"), false, SaveAs);
|
||||
|
||||
contextMenu.DropDown(new Rect(5f, 17f, 0f, 0f));
|
||||
}
|
||||
|
||||
public void EditContextMenu() {
|
||||
GenericMenu contextMenu = new GenericMenu();
|
||||
contextMenu.AddItem(new GUIContent("Clear"), false, () => graph.Clear());
|
||||
|
||||
contextMenu.DropDown(new Rect(5f, 17f, 0f, 0f));
|
||||
}
|
||||
|
||||
public void ToolsContextMenu() {
|
||||
GenericMenu contextMenu = new GenericMenu();
|
||||
contextMenu.AddItem(new GUIContent("Debug Custom Node Editors"), false, () => CacheCustomNodeEditors());
|
||||
|
||||
contextMenu.DropDown(new Rect(5f, 17f, 0f, 0f));
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa774a466fc664148b43879d282ea071
|
||||
timeCreated: 1505932458
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
x
Reference in New Issue
Block a user