Пример #1
0
    public void OnSelect()
    {
        Debug.Log("keyboardSet");
        KeyboardMain km = Resources.FindObjectsOfTypeAll <KeyboardMain>()[0];

        //km.gameObject.SetActive(true);
        km.InputDisplay = transform.parent.Find("Text").gameObject;
        km.OnStart(transform.parent);
        //keyboard = new TouchScreenKeyboard("Sample text that goes into the textbox", TouchScreenKeyboardType.Default, false, false, false, false, "sample prompting text that goes above the textbox");
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        if (KeyboardOne == null)
        {
            KeyboardOne = FindObjectOfType <KeyboardMain>().gameObject;
        }
        keyboardMain = KeyboardOne.GetComponent <KeyboardMain>();
        audioSource  = KeyboardOne.GetComponent <AudioSource>();
        keyColor     = GetComponent <MeshRenderer>().material.GetColor("_Color");

        if (GetComponent <Microsoft.MixedReality.Toolkit.UI.PressableButton>() != null && GetComponent <Microsoft.MixedReality.Toolkit.UI.PressableButton>().enabled)
        {
            GetComponent <Microsoft.MixedReality.Toolkit.UI.PressableButton>().ButtonPressed.AddListener(UI_OnClick);
        }

        if (GetComponentInChildren <Microsoft.MixedReality.Toolkit.UI.Interactable>() != null)
        {
            GetComponentInChildren <Microsoft.MixedReality.Toolkit.UI.Interactable>().OnClick.AddListener(UI_OnClick);
        }
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     keyboardMain = KeyboardOne.GetComponent <KeyboardMain>();
     audioSource  = KeyboardOne.GetComponent <AudioSource>();
     keyColor     = GetComponent <MeshRenderer>().material.GetColor("_Color");
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     keyboardMain = KeyboardOne.GetComponent <KeyboardMain>();
     audioSource  = KeyboardOne.GetComponent <AudioSource>();
 }