start to make tabs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user