2022-09-05 11:46:08 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
2022-09-13 17:33:03 +00:00
|
|
|
public class LoadDirChanger : MonoBehaviour
|
2022-09-05 11:46:08 +00:00
|
|
|
{
|
|
|
|
public InputField LoadDirDateTextBox;
|
|
|
|
public InputField LoadDirTimeTextBox;
|
|
|
|
public Toggle Toggle;
|
|
|
|
public GameObject DataTransfer;
|
|
|
|
|
2022-09-13 17:33:03 +00:00
|
|
|
|
|
|
|
public void OnDirToggleChanged()
|
2022-09-05 11:46:08 +00:00
|
|
|
{
|
|
|
|
// if loadDirToggle is on then turn off the input text boxs.
|
|
|
|
LoadDirDateTextBox.interactable = Toggle.isOn;
|
|
|
|
LoadDirTimeTextBox.interactable = Toggle.isOn;
|
|
|
|
// if loadDirToggle is off set loaddirs as 0.
|
|
|
|
if (!Toggle.isOn)
|
|
|
|
{
|
|
|
|
DataTransfer.GetComponent<StartSeneData>().LoadDirDate = "0";
|
|
|
|
DataTransfer.GetComponent<StartSeneData>().LoadDirTime = "0";
|
|
|
|
}
|
|
|
|
}
|
2022-09-13 17:33:03 +00:00
|
|
|
|
|
|
|
public void OnDateValueChanged()
|
|
|
|
{
|
|
|
|
string input = LoadDirDateTextBox.GetComponent<InputField>().text;
|
|
|
|
DataTransfer.GetComponent<StartSeneData>().LoadDirDate = input;
|
|
|
|
}
|
|
|
|
public void OnTimeValueChanged()
|
|
|
|
{
|
|
|
|
string input = LoadDirTimeTextBox.GetComponent<InputField>().text;
|
|
|
|
DataTransfer.GetComponent<StartSeneData>().LoadDirTime = input;
|
|
|
|
}
|
2022-09-05 11:46:08 +00:00
|
|
|
}
|