mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
* Expanded Trace logging for Overwatch and RL, updated The Witcher 3 mod for 1.22 * Events WIP * Moved some views around, added event views * Implemented events * Some improvements to Overwatch parsing.. some. * Improved Overwatch parsing to work well with events * Fixed ultimate ready false positive during ultimate usage * Added debug window which currently shows Razer SDK keyboard output * Expanded Overwatch data model (todo: sticky values to avoid false-positives) * Added sticky values to Overwatch datamodel, should resolve most flickering/false positives * Layer refactor WIP * Moved layer types, animations, conditions and events to interfaces. (WIP) * Code cleanup, moved all profile related models to their own folder/namespace * Finished most of the profile refactoring * More profile refactoring, app compiles again * Switched from XML to JSON for profiles (refactor broke existing profiles anyway) * Made animation event expiration generic and fixed all serialization issues I've come across so far * Cleaned up settings, rigged basic LayerEditorView(Model) to refactored models * Rigged most layer type viewmodels back up to the new models * Fixed most view(models). Added animations to mice and headset. Replaced serialization-based cloning with NClone Fixed some rendering issues that came up with refactoring * Added Current Time to WindowsProfile * Cloning fixes Replaced glitchy cloning package with a simple serialization clone (that package looked so good :c) Removed serialization cloning from render process * Expanded Trace logging for Overwatch and RL, updated The Witcher 3 mod for 1.22 * Events WIP * Moved some views around, added event views * Implemented events * Some improvements to Overwatch parsing.. some. * Improved Overwatch parsing to work well with events * Fixed ultimate ready false positive during ultimate usage * Added debug window which currently shows Razer SDK keyboard output * Expanded Overwatch data model (todo: sticky values to avoid false-positives) * Added sticky values to Overwatch datamodel, should resolve most flickering/false positives * Layer refactor WIP * Moved layer types, animations, conditions and events to interfaces. (WIP) * Code cleanup, moved all profile related models to their own folder/namespace * Finished most of the profile refactoring * More profile refactoring, app compiles again * Switched from XML to JSON for profiles (refactor broke existing profiles anyway) * Made animation event expiration generic and fixed all serialization issues I've come across so far * Cleaned up settings, rigged basic LayerEditorView(Model) to refactored models * Rigged most layer type viewmodels back up to the new models * Fixed most view(models). Added animations to mice and headset. Replaced serialization-based cloning with NClone Fixed some rendering issues that came up with refactoring * Added Current Time to WindowsProfile * Cloning fixes Replaced glitchy cloning package with a simple serialization clone (that package looked so good :c) Removed serialization cloning from render process
48 lines
1.8 KiB
C#
48 lines
1.8 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Artemis.Models.Interfaces;
|
|
using Artemis.Profiles.Layers.Interfaces;
|
|
using Artemis.Profiles.Layers.Models;
|
|
using Artemis.Utilities;
|
|
using Caliburn.Micro;
|
|
|
|
namespace Artemis.ViewModels.Profiles.Layers
|
|
{
|
|
public class MousePropertiesViewModel : LayerPropertiesViewModel
|
|
{
|
|
private ILayerAnimation _selectedLayerAnimation;
|
|
|
|
public MousePropertiesViewModel(LayerModel layerModel, IDataModel dataModel,
|
|
IEnumerable<ILayerAnimation> layerAnimations) : base(layerModel, dataModel)
|
|
{
|
|
LayerAnimations = new BindableCollection<ILayerAnimation>(layerAnimations);
|
|
OpacityProperties = new LayerDynamicPropertiesViewModel("Opacity",
|
|
new BindableCollection<GeneralHelpers.PropertyCollection>(GeneralHelpers.GenerateTypeMap(dataModel)),
|
|
layerModel.Properties);
|
|
|
|
SelectedLayerAnimation = LayerAnimations.FirstOrDefault(l => l.Name == layerModel.LayerAnimation.Name) ??
|
|
LayerAnimations.First(l => l.Name == "None");
|
|
}
|
|
|
|
public BindableCollection<ILayerAnimation> LayerAnimations { get; set; }
|
|
public LayerDynamicPropertiesViewModel OpacityProperties { get; set; }
|
|
|
|
public ILayerAnimation SelectedLayerAnimation
|
|
{
|
|
get { return _selectedLayerAnimation; }
|
|
set
|
|
{
|
|
if (Equals(value, _selectedLayerAnimation)) return;
|
|
_selectedLayerAnimation = value;
|
|
NotifyOfPropertyChange(() => SelectedLayerAnimation);
|
|
}
|
|
}
|
|
|
|
public override void ApplyProperties()
|
|
{
|
|
OpacityProperties.Apply(LayerModel);
|
|
LayerModel.Properties.Brush = Brush;
|
|
LayerModel.LayerAnimation = SelectedLayerAnimation;
|
|
}
|
|
}
|
|
} |