You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
872 B
36 lines
872 B
using UnityEngine; |
|
using System.Collections; |
|
using UnityEngine.UI; |
|
using System; |
|
|
|
public class DataTimeUI : MonoBehaviour { |
|
|
|
// Use this for initialization |
|
public GameObject dataPanel; |
|
public Text dataTime; |
|
public bool time; |
|
public float posX; |
|
public float posY; |
|
void Start () { |
|
|
|
} |
|
|
|
// Update is called once per frame |
|
void Update () { |
|
|
|
} |
|
public void Click() |
|
{ |
|
//GameObject panel = Instantiate(dataPanel) as GameObject; |
|
//panel.transform.parent = transform; |
|
dataPanel.SetActive(true); |
|
dataPanel.transform.localPosition = new Vector3(posX, posY,0); |
|
var text = dataTime.text; |
|
DateTime dt= DateTime.Now; |
|
if (text != "") |
|
{ |
|
dt = Convert.ToDateTime(text); |
|
} |
|
dataPanel.GetComponent<DateTimeControl>().setDateTime(dt, time, dataTime); |
|
} |
|
}
|
|
|