1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Robert 2bf36fbf20 Core - Refactored effects
Profile editor - Added effect creation
2022-04-23 17:07:04 +02:00

28 lines
714 B
C#

using Artemis.Core.LayerEffects;
using Avalonia;
using Avalonia.Input;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
namespace Artemis.UI.Screens.ProfileEditor.Properties.Dialogs;
public class AddEffectView : ReactiveUserControl<AddEffectViewModel>
{
public AddEffectView()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
{
if (sender is not IDataContextProvider {DataContext: LayerEffectDescriptor descriptor} || ViewModel == null)
return;
ViewModel?.AddLayerEffect(descriptor);
}
}