Skip to content

Commit 66b9660

Browse files
committed
Update NodeUI.cs
1 parent bcb38b1 commit 66b9660

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

game/addons/tools/Code/NodeGraph/NodeUI.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private void UpdatePlugs( bool firstTime )
298298

299299
if ( !match.IsValid() )
300300
{
301-
Inputs.Insert( index, new PlugIn( this, plug ) );
301+
Inputs.Insert( index, CreatePlugIn( this, plug ) );
302302
}
303303
else if ( Inputs.IndexOf( match ) != index )
304304
{
@@ -318,7 +318,7 @@ private void UpdatePlugs( bool firstTime )
318318

319319
if ( !match.IsValid() )
320320
{
321-
Outputs.Insert( index, new PlugOut( this, plug ) );
321+
Outputs.Insert( index, CreatePlugOut( this, plug ) );
322322
}
323323
else if ( Outputs.IndexOf( match ) != index )
324324
{
@@ -335,6 +335,16 @@ private void UpdatePlugs( bool firstTime )
335335
Graph?.NodePositionChanged( this );
336336
}
337337

338+
protected virtual PlugIn CreatePlugIn( NodeUI ui, IPlugIn plugIn )
339+
{
340+
return new PlugIn( ui, plugIn );
341+
}
342+
343+
protected virtual PlugOut CreatePlugOut( NodeUI ui, IPlugOut plugOut )
344+
{
345+
return new PlugOut( ui, plugOut );
346+
}
347+
338348
protected virtual void Layout()
339349
{
340350
var hasThumb = !Node.HasTitleBar && Node.DisplayInfo.Icon is not null || Node.Thumbnail is not null;

0 commit comments

Comments
 (0)