mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Profiles - Added system that displays when a layer is causing errors
This commit is contained in:
1 parent
3b7e226885
commit
5b6fc9eec7
18 files changed
+457
-95
No files matched your search
@@ -501,11 +501,17 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
||||
|
||||
public void GoToEnd()
|
||||
{
|
||||
if (SelectedProfileElement == null)
|
||||
return;
|
||||
|
||||
ProfileEditorService.CurrentTime = SelectedProfileElement.Timeline.EndSegmentEndPosition;
|
||||
}
|
||||
|
||||
public void GoToPreviousFrame()
|
||||
{
|
||||
if (SelectedProfileElement == null)
|
||||
return;
|
||||
|
||||
double frameTime = 1000.0 / SettingsService.GetSetting("Core.TargetFrameRate", 25).Value;
|
||||
double newTime = Math.Max(0, Math.Round((ProfileEditorService.CurrentTime.TotalMilliseconds - frameTime) / frameTime) * frameTime);
|
||||
ProfileEditorService.CurrentTime = TimeSpan.FromMilliseconds(newTime);
|
||||
@@ -513,6 +519,9 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
||||
|
||||
public void GoToNextFrame()
|
||||
{
|
||||
if (SelectedProfileElement == null)
|
||||
return;
|
||||
|
||||
double frameTime = 1000.0 / SettingsService.GetSetting("Core.TargetFrameRate", 25).Value;
|
||||
double newTime = Math.Round((ProfileEditorService.CurrentTime.TotalMilliseconds + frameTime) / frameTime) * frameTime;
|
||||
newTime = Math.Min(newTime, SelectedProfileElement.Timeline.EndSegmentEndPosition.TotalMilliseconds);
|
||||
|
||||
Reference in new issue
Block a user