mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Visual Scripting: Improved cable creation
This commit is contained in:
parent
d27ce2bdf9
commit
1e67c1c567
@ -177,8 +177,10 @@ namespace Artemis.VisualScripting.Editor.Controls
|
|||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsTypeCompatible(Type type) => ((Pin.Pin.Direction == PinDirection.Input) && (Pin.Pin.Type == typeof(object))) || (Pin.Pin.Type == type);
|
private bool IsTypeCompatible(Type type) => (Pin.Pin.Type == type)
|
||||||
|
|| ((Pin.Pin.Direction == PinDirection.Input) && (Pin.Pin.Type == typeof(object)))
|
||||||
|
|| ((Pin.Pin.Direction == PinDirection.Output) && (type == typeof(object)));
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,17 +8,18 @@ namespace Artemis.VisualScripting.Internal
|
|||||||
#region Properties & Fields
|
#region Properties & Fields
|
||||||
|
|
||||||
public override PinDirection Direction { get; }
|
public override PinDirection Direction { get; }
|
||||||
public override Type Type { get; } = typeof(object);
|
public override Type Type { get; }
|
||||||
public override object PinValue => null;
|
public override object PinValue => null;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public IsConnectingPin(PinDirection direction)
|
public IsConnectingPin(PinDirection direction, Type type)
|
||||||
: base(null, null)
|
: base(null, null)
|
||||||
{
|
{
|
||||||
this.Direction = direction;
|
this.Direction = direction;
|
||||||
|
this.Type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user