Exemplo n.º 1
0
        public static void Show(View rootView)
        {
            if (rootView == null)
            {
                throw new NullReferenceException("Root view is null");
            }

            m_rootView = rootView;
        }
Exemplo n.º 2
0
        private bool KeyDownHandler(View view, Event evt)
        {
            if (TextKeyDelegate == null)
            {
                return false;
            }

            if (m_firstKeyDown)
            {
                m_firstKeyDown = false;

                IsCtrlPressed = evt.control;
                IsShiftPressed = evt.shift;
                IsAltPressed = evt.alt;
                IsCmdPressed = evt.command;

                KeyCode key = GetKeyCode(evt);
                if (OnKeyPress(key))
                {
                    return true;
                }

                try
                {
                    if (TextKeyDelegate(this, key, true))
                    {
                        return true;
                    }
                }
                catch (Exception e)
                {
					LunarPlugin.Log.error(e);
                }
            }

            if (Event.current.keyCode == KeyCode.Tab || Event.current.character == '\t')
            {
                Event.current.Use();  // disable focus traversal on the tab key
            }

            return false;
        }