mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core - Added ColorGradient type to use for.. gradients!
Core - Initialisation process no longer takes place in core constructor and is no longer async UI - Fixed exceptions during init not being shown Gradient editor - Started work on this
This commit is contained in:
1 parent
9b62ba5f3d
commit
c3b2c981da
29 files changed
+1517
-113
No files matched your search
+1
-1
@@ -95,7 +95,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
|
||||
base.OnDeactivate();
|
||||
}
|
||||
|
||||
private void ProfileEditorServiceOnProfileElementSelected(object? sender, ProfileElementEventArgs e)
|
||||
private void ProfileEditorServiceOnProfileElementSelected(object sender, ProfileElementEventArgs e)
|
||||
{
|
||||
PopulateProperties(e.ProfileElement, e.PreviousProfileElement);
|
||||
}
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BrushPropertyInputView.xaml
|
||||
/// </summary>
|
||||
public partial class BrushPropertyInputView : UserControl
|
||||
{
|
||||
public BrushPropertyInputView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput.ColorGradientPropertyInputView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput"
|
||||
xmlns:artemis="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
||||
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="25" d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance local:ColorGradientPropertyInputViewModel}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0 0 5 4" Width="10" VerticalAlignment="Bottom" Text="{Binding LayerPropertyViewModel.LayerProperty.InputPrefix}" />
|
||||
<artemis:GradientPicker Width="132"
|
||||
Margin="0 2"
|
||||
Padding="0 -1"
|
||||
ColorGradient="{Binding ColorGradientInputValue}" />
|
||||
<TextBlock Margin="5 0 0 4" Width="10" VerticalAlignment="Bottom" Text="{Binding LayerPropertyViewModel.LayerProperty.InputAffix}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
|
||||
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput
|
||||
{
|
||||
public class ColorGradientPropertyInputViewModel : PropertyInputViewModel
|
||||
{
|
||||
public ColorGradientPropertyInputViewModel(IProfileEditorService profileEditorService) : base(profileEditorService)
|
||||
{
|
||||
}
|
||||
|
||||
public sealed override List<Type> CompatibleTypes { get; } = new List<Type> {typeof(ColorGradient)};
|
||||
|
||||
public ColorGradient ColorGradientInputValue
|
||||
{
|
||||
get => (ColorGradient) InputValue ?? new ColorGradient();
|
||||
set => InputValue = value;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
NotifyOfPropertyChange(() => ColorGradientInputValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for EnumPropertyInputView.xaml
|
||||
/// </summary>
|
||||
public partial class EnumPropertyInputView : UserControl
|
||||
{
|
||||
public EnumPropertyInputView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SKColorPropertyInputView.xaml
|
||||
/// </summary>
|
||||
public partial class SKColorPropertyInputView : UserControl
|
||||
{
|
||||
public SKColorPropertyInputView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -85,12 +85,12 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree
|
||||
parent?.RaiseEvent(eventArg);
|
||||
}
|
||||
|
||||
private void OnCurrentTimeChanged(object? sender, EventArgs e)
|
||||
private void OnCurrentTimeChanged(object sender, EventArgs e)
|
||||
{
|
||||
Update(false);
|
||||
}
|
||||
|
||||
private void OnSelectedProfileElementUpdated(object? sender, ProfileElementEventArgs e)
|
||||
private void OnSelectedProfileElementUpdated(object sender, ProfileElementEventArgs e)
|
||||
{
|
||||
Update(true);
|
||||
}
|
||||
|
||||
+2
-2
@@ -102,12 +102,12 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.Timeline
|
||||
UpdateEndTime();
|
||||
}
|
||||
|
||||
private void OnSelectedProfileElementUpdated(object? sender, ProfileElementEventArgs e)
|
||||
private void OnSelectedProfileElementUpdated(object sender, ProfileElementEventArgs e)
|
||||
{
|
||||
Update();
|
||||
}
|
||||
|
||||
private void OnPixelsPerSecondChanged(object? sender, EventArgs e)
|
||||
private void OnPixelsPerSecondChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateKeyframePositions();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user