From b2e7de5a472406d0e2528fa5b3ce8330919f8835 Mon Sep 17 00:00:00 2001 From: Asval Date: Mon, 13 May 2024 17:03:01 +0200 Subject: [PATCH] time multiplier --- CUE4Parse | 2 +- FModel/Views/Snooper/Animations/TimeTracker.cs | 9 +++++++-- FModel/Views/Snooper/SnimGui.cs | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 85b8bde5..3cb7db7c 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 85b8bde53e4df6d4b0a8269dc2c6e0b25a5f44ac +Subproject commit 3cb7db7ca08cacb7b1ccd51ab3cba6a52117a39e diff --git a/FModel/Views/Snooper/Animations/TimeTracker.cs b/FModel/Views/Snooper/Animations/TimeTracker.cs index c4ed9cbe..5417f39c 100644 --- a/FModel/Views/Snooper/Animations/TimeTracker.cs +++ b/FModel/Views/Snooper/Animations/TimeTracker.cs @@ -20,6 +20,7 @@ public class TimeTracker : IDisposable public bool IsActive; public float ElapsedTime; public float MaxElapsedTime; + public int TimeMultiplier; public TimeTracker() { @@ -29,7 +30,7 @@ public class TimeTracker : IDisposable public void Update(float deltaSeconds) { if (IsPaused || IsActive) return; - ElapsedTime += deltaSeconds; + ElapsedTime += deltaSeconds * TimeMultiplier; if (ElapsedTime >= MaxElapsedTime) Reset(false); } @@ -47,7 +48,11 @@ public class TimeTracker : IDisposable { IsPaused = false; ElapsedTime = 0.0f; - if (doMet) MaxElapsedTime = 0.01f; + if (doMet) + { + MaxElapsedTime = 0.01f; + TimeMultiplier = 1; + } } public void Dispose() diff --git a/FModel/Views/Snooper/SnimGui.cs b/FModel/Views/Snooper/SnimGui.cs index f39c38f2..30a78f9b 100644 --- a/FModel/Views/Snooper/SnimGui.cs +++ b/FModel/Views/Snooper/SnimGui.cs @@ -217,7 +217,9 @@ public class SnimGui { Layout("Animate With Rotation Only");ImGui.PushID(1); ImGui.Checkbox("", ref s.Renderer.AnimateWithRotationOnly); - ImGui.PopID();Layout("Vertex Colors");ImGui.PushID(2); + ImGui.PopID();Layout("Time Multiplier");ImGui.PushID(2); + ImGui.DragInt("", ref s.Renderer.Options.Tracker.TimeMultiplier, 0.1f, 1, 8, "x%i", ImGuiSliderFlags.NoInput); + ImGui.PopID();Layout("Vertex Colors");ImGui.PushID(3); var c = (int) s.Renderer.Color; ImGui.Combo("vertex_colors", ref c, "Default\0Sections\0Colors\0Normals\0Texture Coordinates\0");