mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Profile editor - Changed approach to one timeline split into segments
This commit is contained in:
1 parent
e89199f563
commit
31cfd480a4
17 files changed
+287
-257
No files matched your search
@@ -25,7 +25,6 @@ namespace Artemis.UI.Shared.Services
|
||||
private TimeSpan _currentTime;
|
||||
private TimeSpan _lastUpdateTime;
|
||||
private int _pixelsPerSecond;
|
||||
private Timeline _currentTimeline;
|
||||
|
||||
public ProfileEditorService(ICoreService coreService, IProfileService profileService, IKernel kernel, ILogger logger)
|
||||
{
|
||||
@@ -49,24 +48,15 @@ namespace Artemis.UI.Shared.Services
|
||||
set
|
||||
{
|
||||
if (_currentTime.Equals(value)) return;
|
||||
_currentTime = value;
|
||||
if (value > SelectedProfileElement.TimelineLength)
|
||||
_currentTime = SelectedProfileElement.TimelineLength;
|
||||
else
|
||||
_currentTime = value;
|
||||
UpdateProfilePreview();
|
||||
OnCurrentTimeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public Timeline CurrentTimeline
|
||||
{
|
||||
get => _currentTimeline;
|
||||
set
|
||||
{
|
||||
if (_currentTimeline.Equals(value)) return;
|
||||
_currentTimeline = value;
|
||||
UpdateProfilePreview();
|
||||
OnCurrentTimelineChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public int PixelsPerSecond
|
||||
{
|
||||
get => _pixelsPerSecond;
|
||||
@@ -126,14 +116,12 @@ namespace Artemis.UI.Shared.Services
|
||||
var delta = CurrentTime - _lastUpdateTime;
|
||||
foreach (var folder in SelectedProfile.GetAllFolders())
|
||||
{
|
||||
folder.CurrentTimeline = CurrentTimeline;
|
||||
foreach (var baseLayerEffect in folder.LayerEffects)
|
||||
baseLayerEffect.Update(delta.TotalSeconds);
|
||||
}
|
||||
|
||||
foreach (var layer in SelectedProfile.GetAllLayers())
|
||||
{
|
||||
layer.CurrentTimeline = CurrentTimeline;
|
||||
layer.OverrideProgress(CurrentTime);
|
||||
layer.LayerBrush?.Update(delta.TotalSeconds);
|
||||
foreach (var baseLayerEffect in layer.LayerEffects)
|
||||
|
||||
Reference in new issue
Block a user