File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Assets/com.alelievr.NodeGraphProcessor/Editor/Views Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,11 @@ void InitializeView()
156
156
157
157
title = ( string . IsNullOrEmpty ( nodeTarget . name ) ) ? nodeTarget . GetType ( ) . Name : nodeTarget . name ;
158
158
159
- // Apply node accent color
160
- if ( nodeTarget . color . a > 0 )
161
- {
162
- titleContainer . style . borderBottomColor = new StyleColor ( nodeTarget . color ) ;
163
- titleContainer . style . borderBottomWidth = new StyleFloat ( 5f ) ;
164
- }
165
-
166
159
initializing = true ;
167
160
168
161
SetPosition ( nodeTarget . position ) ;
169
-
162
+ SetNodeColor ( nodeTarget . color ) ;
163
+
170
164
AddInputContainer ( ) ;
171
165
}
172
166
@@ -634,6 +628,12 @@ protected virtual void DrawDefaultInspector(bool fromInspector = false)
634
628
}
635
629
}
636
630
631
+ protected virtual void SetNodeColor ( Color color )
632
+ {
633
+ titleContainer . style . borderBottomColor = new StyleColor ( color ) ;
634
+ titleContainer . style . borderBottomWidth = new StyleFloat ( color . a > 0 ? 5f : 0f ) ;
635
+ }
636
+
637
637
private void AddEmptyField ( FieldInfo field , bool fromInspector )
638
638
{
639
639
if ( field . GetCustomAttribute ( typeof ( InputAttribute ) ) == null || fromInspector ) return ;
You can’t perform that action at this time.
0 commit comments