@@ -15,11 +15,11 @@ internal class GraphSidePanel
15
15
private GraphEditorWindow _window ;
16
16
private HashSet < string > _ignoredFields ;
17
17
private GraphPanelDrawer _panelDrawer ;
18
- private Vector2 _scrollPos ;
18
+ private float _scrollPos ;
19
19
private float _width ;
20
20
private bool _opened ;
21
21
private bool _dragging ;
22
- private string [ ] _toolbarLabels = { "Properties " , "Node" } ;
22
+ private string [ ] _toolbarLabels = { "Graph " , "Node" } ;
23
23
private int _selectedIndex ;
24
24
25
25
public float Width => _opened ? _width : 0f ;
@@ -66,14 +66,24 @@ public void Draw(bool opened, float height, float winWidth, Event e)
66
66
Rect position = new Rect ( winWidth - _width , 0f , _width , height ) ;
67
67
68
68
GUILayout . BeginArea ( position , EditorStyles . helpBox ) ;
69
- _selectedIndex = GUILayout . Toolbar ( _selectedIndex , _toolbarLabels ) ;
70
- GUILayout . Space ( 5f ) ;
71
- _scrollPos . y = EditorGUILayout . BeginScrollView ( _scrollPos ) . y ;
72
- switch ( _selectedIndex )
69
+
70
+ if ( _window . FullDrawing )
71
+ {
72
+ _scrollPos = EditorGuiLayout . BeginScrollViewVertical ( _scrollPos ) ;
73
+ _panelDrawer . Draw ( _width ) ;
74
+ }
75
+ else
73
76
{
74
- case 0 : _panelDrawer . Draw ( _width ) ; break ;
75
- case 1 : DrawNode ( ) ; break ;
77
+ _selectedIndex = GUILayout . Toolbar ( _selectedIndex , _toolbarLabels ) ;
78
+ GUILayout . Space ( 5f ) ;
79
+ _scrollPos = EditorGuiLayout . BeginScrollViewVertical ( _scrollPos ) ;
80
+ switch ( _selectedIndex )
81
+ {
82
+ case 0 : _panelDrawer . Draw ( _width ) ; break ;
83
+ case 1 : DrawNode ( ) ; break ;
84
+ }
76
85
}
86
+
77
87
EditorGUILayout . EndScrollView ( ) ;
78
88
GUILayout . EndArea ( ) ;
79
89
0 commit comments