32 lines
540 B
C#
32 lines
540 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace VRKeyboard.Utils
|
|
{
|
|
public class Key : MonoBehaviour
|
|
{
|
|
public delegate void OnKeyClickedHandler(string key);
|
|
|
|
protected Text key;
|
|
|
|
public event OnKeyClickedHandler OnKeyClicked;
|
|
|
|
public virtual void Awake()
|
|
{
|
|
key = base.transform.Find("Text").GetComponent<Text>();
|
|
GetComponent<Button>().onClick.AddListener(delegate
|
|
{
|
|
this.OnKeyClicked(key.text);
|
|
});
|
|
}
|
|
|
|
public virtual void CapsLock(bool isUppercase)
|
|
{
|
|
}
|
|
|
|
public virtual void ShiftKey()
|
|
{
|
|
}
|
|
}
|
|
}
|