mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Profile editor - Moved layer property input to the Shared UI project
This commit is contained in:
1 parent
eda57f6d32
commit
92faafe1de
71 files changed
+1211
-434
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.Models.Profile.LayerProperties.Attributes;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
@@ -74,6 +75,8 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
/// </summary>
|
||||
public bool IsCoreProperty { get; internal set; }
|
||||
|
||||
public PropertyDescriptionAttribute PropertyDescription { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all the keyframes in their non-generic base form, without their values being available
|
||||
/// </summary>
|
||||
@@ -81,7 +84,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
|
||||
internal PropertyEntity PropertyEntity { get; set; }
|
||||
internal LayerPropertyGroup LayerPropertyGroup { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Applies the provided property entity to the layer property by deserializing the JSON base value and keyframe values
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of property encapsulated in this layer property</typeparam>
|
||||
public abstract class LayerProperty<T> : BaseLayerProperty
|
||||
public class LayerProperty<T> : BaseLayerProperty
|
||||
{
|
||||
private T _baseValue;
|
||||
private T _currentValue;
|
||||
@@ -172,7 +172,10 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
/// </summary>
|
||||
/// <param name="keyframeProgress">The linear current keyframe progress</param>
|
||||
/// <param name="keyframeProgressEased">The current keyframe progress, eased with the current easing function</param>
|
||||
protected abstract void UpdateCurrentValue(float keyframeProgress, float keyframeProgressEased);
|
||||
protected virtual void UpdateCurrentValue(float keyframeProgress, float keyframeProgressEased)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the property, moving the timeline forwards by the provided <paramref name="deltaTime" />
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace Artemis.Core.Models.Profile
|
||||
/// </summary>
|
||||
public bool IsCorePropertyGroup { get; internal set; }
|
||||
|
||||
public PropertyGroupDescriptionAttribute GroupDescription { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the property is hidden in the UI
|
||||
/// </summary>
|
||||
@@ -132,7 +134,9 @@ namespace Artemis.Core.Models.Profile
|
||||
|
||||
var instance = (BaseLayerProperty) Activator.CreateInstance(propertyInfo.PropertyType, true);
|
||||
instance.Parent = this;
|
||||
instance.PropertyDescription = (PropertyDescriptionAttribute)propertyDescription;
|
||||
instance.Layer = layer;
|
||||
|
||||
InitializeProperty(layer, path + propertyInfo.Name, instance);
|
||||
propertyInfo.SetValue(this, instance);
|
||||
_layerProperties.Add(instance);
|
||||
@@ -147,6 +151,7 @@ namespace Artemis.Core.Models.Profile
|
||||
|
||||
var instance = (LayerPropertyGroup) Activator.CreateInstance(propertyInfo.PropertyType);
|
||||
instance.Parent = this;
|
||||
instance.GroupDescription = (PropertyGroupDescriptionAttribute)propertyGroupDescription;
|
||||
instance.InitializeProperties(layerService, layer, $"{path}{propertyInfo.Name}.");
|
||||
propertyInfo.SetValue(this, instance);
|
||||
_layerPropertyGroups.Add(instance);
|
||||
@@ -162,7 +167,7 @@ namespace Artemis.Core.Models.Profile
|
||||
PropertiesInitialized = true;
|
||||
OnPropertyGroupInitialized();
|
||||
}
|
||||
|
||||
|
||||
internal void ApplyToEntity()
|
||||
{
|
||||
if (!PropertiesInitialized)
|
||||
|
||||
Reference in new issue
Block a user