diff --git a/src/UI/UIManager.cs b/src/UI/UIManager.cs index 7e648f2..ebd2d51 100644 --- a/src/UI/UIManager.cs +++ b/src/UI/UIManager.cs @@ -46,7 +46,7 @@ namespace UnityExplorer.UI public static RectTransform NavBarRect; public static GameObject NavbarTabButtonHolder; - private static readonly Vector2 NAVBAR_DIMENSIONS = new(1250f, 35f); + private static readonly Vector2 NAVBAR_DIMENSIONS = new(1300f, 35f); private static ButtonRef closeBtn; private static TimeScaleWidget timeScaleWidget; diff --git a/src/UI/Widgets/TimeScaleWidget.cs b/src/UI/Widgets/TimeScaleWidget.cs index 7972a91..15ee1a3 100644 --- a/src/UI/Widgets/TimeScaleWidget.cs +++ b/src/UI/Widgets/TimeScaleWidget.cs @@ -114,16 +114,16 @@ namespace UnityExplorer.UI.Widgets timeInput.Text = string.Empty; timeInput.Text = Time.timeScale.ToString(); - lockBtn = UIFactory.CreateButton(parent, "PauseButton", "Lock", new Color(0.2f, 0.2f, 0.2f)); - UIFactory.SetLayoutElement(lockBtn.Component.gameObject, minHeight: 25, minWidth: 50); - lockBtn.OnClick += OnPauseButtonClicked; - GameObject sliderObj = UIFactory.CreateSlider(parent, "Slider_time_scale", out Slider slider); UIFactory.SetLayoutElement(sliderObj, minHeight: 25, minWidth: 75, flexibleWidth: 0); slider.onValueChanged.AddListener((newTimeScale) => desiredTime = newTimeScale); slider.m_FillImage.color = Color.clear; slider.minValue = 0f; slider.maxValue = 2f; + + lockBtn = UIFactory.CreateButton(parent, "PauseButton", "Lock", new Color(0.2f, 0.2f, 0.2f)); + UIFactory.SetLayoutElement(lockBtn.Component.gameObject, minHeight: 25, minWidth: 50); + lockBtn.OnClick += OnPauseButtonClicked; } // Only allow Time.timeScale to be set if the user hasn't "locked" it or if we are setting the value internally.