Datamodel - Added bool and enum support

Layer properties - Added bool support
Draggable float - Housekeeping 🙃
This commit is contained in:
Robert committed 2020-09-17 19:53:17 +02:00
1 parent a3290c40f8
commit c661b64404
14 files changed
+165 -9

No files matched your search

@@ -0,0 +1,26 @@
namespace Artemis.Core.DefaultTypes
{
/// <inheritdoc />
public class BoolLayerProperty : LayerProperty<bool>
{
internal BoolLayerProperty()
{
KeyframesSupported = false;
DataBindingsSupported = false;
}
/// <summary>
/// Implicitly converts an <see cref="BoolLayerProperty" /> to a <see cref="bool" />
/// </summary>
public static implicit operator bool(BoolLayerProperty p)
{
return p.CurrentValue;
}
/// <inheritdoc />
protected override void UpdateCurrentValue(float keyframeProgress, float keyframeProgressEased)
{
throw new ArtemisCoreException("Boolean properties do not support keyframes.");
}
}
}