mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Layer properties - Added drag-editing for number-based properties
Layer properties - Added min and max values Nuget - Updated Stylet to 1.3.1
This commit is contained in:
1 parent
33756a228d
commit
05cc032271
37 files changed
+522
-235
No files matched your search
@@ -522,11 +522,11 @@ namespace Artemis.Core.Models.Profile
|
||||
|
||||
// Transform
|
||||
var transform = new LayerProperty<object>(this, "Core.Transform", "Transform", "A collection of transformation properties.") {ExpandByDefault = true};
|
||||
AnchorPointProperty = new LayerProperty<SKPoint>(this, transform, "Core.AnchorPoint", "Anchor Point", "The point at which the shape is attached to its position.");
|
||||
PositionProperty = new LayerProperty<SKPoint>(this, transform, "Core.Position", "Position", "The position of the shape.");
|
||||
ScaleProperty = new LayerProperty<SKSize>(this, transform, "Core.Scale", "Scale", "The scale of the shape.") {InputAffix = "%"};
|
||||
AnchorPointProperty = new LayerProperty<SKPoint>(this, transform, "Core.AnchorPoint", "Anchor Point", "The point at which the shape is attached to its position.") {InputStepSize = 0.001f};
|
||||
PositionProperty = new LayerProperty<SKPoint>(this, transform, "Core.Position", "Position", "The position of the shape.") {InputStepSize = 0.001f};
|
||||
ScaleProperty = new LayerProperty<SKSize>(this, transform, "Core.Scale", "Scale", "The scale of the shape.") {InputAffix = "%", MinInputValue = 0f};
|
||||
RotationProperty = new LayerProperty<float>(this, transform, "Core.Rotation", "Rotation", "The rotation of the shape in degrees.") {InputAffix = "°"};
|
||||
OpacityProperty = new LayerProperty<float>(this, transform, "Core.Opacity", "Opacity", "The opacity of the shape.") {InputAffix = "%"};
|
||||
OpacityProperty = new LayerProperty<float>(this, transform, "Core.Opacity", "Opacity", "The opacity of the shape.") {InputAffix = "%", MinInputValue = 0f, MaxInputValue = 100f};
|
||||
ScaleProperty.Value = new SKSize(100, 100);
|
||||
OpacityProperty.Value = 100;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
Description = description;
|
||||
Type = type;
|
||||
CanUseKeyframes = true;
|
||||
InputStepSize = 1;
|
||||
|
||||
// This can only be null if accessed internally
|
||||
if (PluginInfo == null)
|
||||
@@ -32,6 +33,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
Children = new List<BaseLayerProperty>();
|
||||
BaseKeyframes = new List<BaseKeyframe>();
|
||||
|
||||
|
||||
parent?.Children.Add(this);
|
||||
}
|
||||
|
||||
@@ -86,6 +88,21 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
/// </summary>
|
||||
public string InputAffix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional maximum input value, only enforced in the UI.
|
||||
/// </summary>
|
||||
public object MaxInputValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the input drag step size, used in the UI.
|
||||
/// </summary>
|
||||
public float InputStepSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional minimum input value, only enforced in the UI.
|
||||
/// </summary>
|
||||
public object MinInputValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether this property can use keyframes, True by default.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user