1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2025-07-18 17:38:01 +08:00

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

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

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");
}
}