start to make tabs

This commit is contained in:
2023-04-13 19:50:43 +03:00
parent d1750a6147
commit 1f4659c3c0
10 changed files with 835 additions and 110 deletions
+11 -3
View File
@@ -17,6 +17,12 @@ public class TimeSliderUI : MonoBehaviour
private Slider _slider;
private TimeSpan _time;
private void Start()
{
gameObject.SetActive(false);
}
public void ShowTimeSliderDialog(string title, string description, Action onCancel, Action<TimeSpan> onConfirm)
{
TimeManager.Instance.OnFastForwardEnd += CloseDialog;
@@ -53,9 +59,11 @@ public class TimeSliderUI : MonoBehaviour
private void Update()
{
_time = TimeSpan.FromHours(_slider.value);
_description.text = $"{_time.Hours} hours";
if (gameObject.activeSelf)
{
_time = TimeSpan.FromHours(_slider.value);
_description.text = $"{_time.Hours} hours";
}
}
private void Hide()