1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Robert 51a21b7a8a UI VM factories - Shortened names for readibility
Layer properties - Ensure only LayerBrushes can add properties and make sure that method instantiates a keyframe engine
Layer properties UI - Respond to properties being added/removed
2020-02-12 21:18:00 +01:00

34 lines
1.2 KiB
C#

using Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput;
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree
{
public class PropertyTreeChildViewModel : PropertyTreeItemViewModel
{
public PropertyTreeChildViewModel(LayerPropertyViewModel layerPropertyViewModel) : base(layerPropertyViewModel)
{
PropertyInputViewModel = layerPropertyViewModel.GetPropertyInputViewModel();
}
public PropertyInputViewModel PropertyInputViewModel { get; set; }
public override void Update(bool forceUpdate)
{
if (forceUpdate)
PropertyInputViewModel?.Update();
else
{
// Only update if visible and if keyframes are enabled
if (LayerPropertyViewModel.Parent.IsExpanded && LayerPropertyViewModel.KeyframesEnabled)
PropertyInputViewModel?.Update();
}
}
public override void RemoveLayerProperty(LayerPropertyViewModel layerPropertyViewModel)
{
}
public override void AddLayerProperty(LayerPropertyViewModel layerPropertyViewModel)
{
}
}
}