mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Added preference to disable
This commit is contained in:
parent
d1ad634947
commit
e975d991db
@ -218,7 +218,7 @@ namespace XNodeEditor {
|
||||
}
|
||||
}
|
||||
// Open context menu for auto-connection
|
||||
else if (autoConnectOutput != null) {
|
||||
else if (NodeEditorPreferences.GetSettings().dragToCreate && autoConnectOutput != null) {
|
||||
GenericMenu menu = new GenericMenu();
|
||||
graphEditor.AddContextMenuItems(menu);
|
||||
menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero));
|
||||
|
||||
@ -32,6 +32,7 @@ namespace XNodeEditor {
|
||||
public Color32 highlightColor = new Color32(255, 255, 255, 255);
|
||||
public bool gridSnap = true;
|
||||
public bool autoSave = true;
|
||||
public bool dragToCreate = true;
|
||||
public bool zoomToMouse = true;
|
||||
public bool portTooltips = true;
|
||||
[SerializeField] private string typeColorsData = "";
|
||||
@ -149,6 +150,7 @@ namespace XNodeEditor {
|
||||
settings.highlightColor = EditorGUILayout.ColorField("Selection", settings.highlightColor);
|
||||
settings.noodleType = (NoodleType) EditorGUILayout.EnumPopup("Noodle type", (Enum) settings.noodleType);
|
||||
settings.portTooltips = EditorGUILayout.Toggle("Port Tooltips", settings.portTooltips);
|
||||
settings.dragToCreate = EditorGUILayout.Toggle(new GUIContent("Drag to Create", "Drag a port connection anywhere on the grid to create and connect a node"), settings.dragToCreate);
|
||||
if (GUI.changed) {
|
||||
SavePrefs(key, settings);
|
||||
NodeEditorWindow.RepaintAll();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user