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
2bcee30e11
commit
15bac30362
29 files changed
+1517
-113
No files matched your search
@@ -1,16 +0,0 @@
|
||||
<mde:MaterialWindow x:Class="Artemis.UI.Screens.GradientEditor.GradientEditorView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:gradientEditor="clr-namespace:Artemis.UI.Screens.GradientEditor"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
|
||||
mc:Ignorable="d"
|
||||
Title="Gradient Editor"
|
||||
Height="450" Width="800"
|
||||
d:DataContext="{d:DesignInstance {x:Type gradientEditor:GradientEditorViewModel}}">
|
||||
<Grid>
|
||||
<materialDesign:ColorPicker Color="{Binding CurrentColor}" />
|
||||
</Grid>
|
||||
</mde:MaterialWindow>
|
||||
@@ -1,10 +0,0 @@
|
||||
using System.Windows.Media;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.GradientEditor
|
||||
{
|
||||
public class GradientEditorViewModel : Screen
|
||||
{
|
||||
public Color CurrentColor { get; set; }
|
||||
}
|
||||
}
|
||||
+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();
|
||||
}
|
||||
|
||||
@@ -47,22 +47,22 @@ namespace Artemis.UI.Screens.Splash
|
||||
base.OnClose();
|
||||
}
|
||||
|
||||
private void OnPluginServiceOnPluginLoaded(object? sender, PluginEventArgs args)
|
||||
private void OnPluginServiceOnPluginLoaded(object sender, PluginEventArgs args)
|
||||
{
|
||||
Status = "Initializing UI";
|
||||
}
|
||||
|
||||
private void OnPluginServiceOnPluginLoading(object? sender, PluginEventArgs args)
|
||||
private void OnPluginServiceOnPluginLoading(object sender, PluginEventArgs args)
|
||||
{
|
||||
Status = "Loading plugin: " + args.PluginInfo.Name;
|
||||
}
|
||||
|
||||
private void OnPluginServiceOnCopyingBuildInPlugins(object? sender, EventArgs args)
|
||||
private void OnPluginServiceOnCopyingBuildInPlugins(object sender, EventArgs args)
|
||||
{
|
||||
Status = "Updating built-in plugins";
|
||||
}
|
||||
|
||||
private void OnCoreServiceOnInitialized(object? sender, EventArgs args)
|
||||
private void OnCoreServiceOnInitialized(object sender, EventArgs args)
|
||||
{
|
||||
Execute.OnUIThread(() => RequestClose());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user