Started implementing logic behind the timeline UI

This commit is contained in:
SpoinkyNL committed 2020-01-05 22:10:37 +01:00
1 parent a6c8d339c0
commit 14065bffef
31 files changed
+501 -408

No files matched your search

@@ -1,23 +0,0 @@
using System;
using Stylet;
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.Timeline
{
public class TimelineKeyframeViewModel : PropertyChangedBase
{
private const double BaseSize = 60.0;
public TimeSpan Position { get; set; }
public double X { get; set; }
public string Timestamp { get; set; }
public void Update(int pixelsPerSecond)
{
// var timelinePartWidth = pixelsPerSecond % BaseSize + BaseSize;
// var millisecondsPerPart = extraParts > 0 ? BaseSize * 1000 / extraParts : BaseSize * 1000;
X = pixelsPerSecond * Position.TotalSeconds;
Timestamp = $"{Math.Floor(Position.TotalSeconds):00}.{Position.Milliseconds:000}";
}
}
}