1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2026-10-10 04:53:15 +08:00

Adjusted navbar width and switched the new time scale slider and lock button positions.

This commit is contained in:
originalnicodr
2024-01-13 18:31:26 -03:00
parent c16115f888
commit ba10a10ffc
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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.