1234567891011121314151617181920212223242526272829 |
- using System;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using UnityEngine.UI;
- namespace TriLib.Samples
- {
- public class FileText : MonoBehaviour, ISelectHandler, IEventSystemHandler
- {
- public string Text
- {
- get
- {
- return base.GetComponent<Text>().text;
- }
- set
- {
- base.GetComponent<Text>().text = value;
- }
- }
- public ItemType ItemType { get; set; }
- public void OnSelect(BaseEventData eventData)
- {
- FileOpenDialog.Instance.HandleEvent(this.ItemType, this.Text);
- }
- }
- }
|