From 8c42c916e84e8a29d0380e6b6715f46136ae659d Mon Sep 17 00:00:00 2001 From: SpoinkyNL Date: Tue, 8 Dec 2020 23:28:16 +0100 Subject: [PATCH] Data bindings - Enabled boolean binding --- .../DataBindings/Converters/GeneralDataBindingConverter.cs | 6 +++--- .../DefaultTypes/Properties/BoolLayerProperty.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Converters/GeneralDataBindingConverter.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Converters/GeneralDataBindingConverter.cs index b5672f3b1..584967a76 100644 --- a/src/Artemis.Core/DefaultTypes/DataBindings/Converters/GeneralDataBindingConverter.cs +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Converters/GeneralDataBindingConverter.cs @@ -7,7 +7,7 @@ namespace Artemis.Core /// and a and does not support /// sum or interpolation /// - public class GeneralDataBindingConverter : DataBindingConverter where T : ILayerProperty + public class GeneralDataBindingConverter : DataBindingConverter { /// /// Creates a new instance of the class @@ -19,13 +19,13 @@ namespace Artemis.Core } /// - public override object Sum(object a, object b) + public override T Sum(T a, T b) { throw new NotSupportedException(); } /// - public override object Interpolate(object a, object b, double progress) + public override T Interpolate(T a, T b, double progress) { throw new NotSupportedException(); } diff --git a/src/Artemis.Core/DefaultTypes/Properties/BoolLayerProperty.cs b/src/Artemis.Core/DefaultTypes/Properties/BoolLayerProperty.cs index 0390977f1..bfeb477f4 100644 --- a/src/Artemis.Core/DefaultTypes/Properties/BoolLayerProperty.cs +++ b/src/Artemis.Core/DefaultTypes/Properties/BoolLayerProperty.cs @@ -6,7 +6,7 @@ internal BoolLayerProperty() { KeyframesSupported = false; - DataBindingsSupported = false; + RegisterDataBindingProperty(b => b, new GeneralDataBindingConverter()); } ///