Beispiel #1
0
    private bool processKeyboard()
    {
        dfControl activeControl = dfGUIManager.ActiveControl;

        if (activeControl == null || string.IsNullOrEmpty(Input.inputString) || !activeControl.transform.IsChildOf(base.transform))
        {
            return(false);
        }
        string str = Input.inputString;

        for (int i = 0; i < str.Length; i++)
        {
            char chr = str[i];
            if (chr != '\b' && chr != '\n')
            {
                dfKeyEventArgs dfKeyEventArg = new dfKeyEventArgs(activeControl, (KeyCode)chr, false, false, false)
                {
                    Character = chr
                };
                activeControl.OnKeyPress(dfKeyEventArg);
            }
        }
        return(true);
    }