mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
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
This commit is contained in:
1 parent
b3e1ba6d1c
commit
f4c1c9de3d
29 files changed
+417
-303
No files matched your search
+2
-14
@@ -16,8 +16,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
private readonly IProfileEditorService _profileEditorService;
|
||||
private bool _keyframesEnabled;
|
||||
|
||||
public LayerPropertyViewModel(BaseLayerProperty layerProperty, LayerPropertyViewModel parent, ILayerPropertyViewModelFactory layerPropertyViewModelFactory, IKernel kernel,
|
||||
IProfileEditorService profileEditorService)
|
||||
public LayerPropertyViewModel(BaseLayerProperty layerProperty, LayerPropertyViewModel parent, IKernel kernel, IProfileEditorService profileEditorService)
|
||||
{
|
||||
_kernel = kernel;
|
||||
_profileEditorService = profileEditorService;
|
||||
@@ -28,8 +27,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
Children = new List<LayerPropertyViewModel>();
|
||||
IsExpanded = layerProperty.ExpandByDefault;
|
||||
|
||||
foreach (var child in layerProperty.Children)
|
||||
Children.Add(layerPropertyViewModelFactory.Create(child, this));
|
||||
Parent?.Children.Add(this);
|
||||
}
|
||||
|
||||
public BaseLayerProperty LayerProperty { get; }
|
||||
@@ -78,15 +76,5 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
match.Initialize(this);
|
||||
return match;
|
||||
}
|
||||
|
||||
public IEnumerable<LayerPropertyViewModel> GetAllChildren()
|
||||
{
|
||||
var children = new List<LayerPropertyViewModel>();
|
||||
children.AddRange(Children);
|
||||
foreach (var layerPropertyViewModel in children)
|
||||
children.AddRange(layerPropertyViewModel.GetAllChildren());
|
||||
|
||||
return children;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user