When writing down a bigger timescale than the maximum move the slider to the right.

This commit is contained in:
originalnicodr committed 2024-07-21 18:44:13 -03:00
1 parent 5e9abd33b4
commit 48fec535fd
2 files changed
+6 -1

No files matched your search

+6 -1
View File
@@ -81,7 +81,10 @@ namespace UnityExplorer.UI.Widgets
}
// Allow registering timescale values above the slider max value
if (f > slider.maxValue) {
if (f >= slider.maxValue) {
// Move the slider to the right
slider.value = slider.maxValue;
desiredTime = f;
pause = false;
previousDesiredTime = desiredTime;
@@ -89,6 +92,8 @@ namespace UnityExplorer.UI.Widgets
else {
slider.value = f; // Will update the desiredTime value and extra things
}
timeInput.Text = f.ToString("0.00");
}
}