Exemplo n.º 1
0
        public virtual HandleResult handleKeyboardEvent(KeyboardInputEvent e)
        {
            HandleResult r1 = HandleResult.Pending;
            HandleResult r2 = HandleResult.Pending;

            if (m_base_controller != null)
                r1 = m_base_controller.handleKeyboardEvent(e);

            r2 = m_keyboard_listener.handleEvent(e);

            return r1 == HandleResult.Done || r2 == HandleResult.Done ? HandleResult.Done : HandleResult.Pending;
        }
Exemplo n.º 2
0
 public virtual HandleResult handleEvent(KeyboardInputEvent e)
 {
     int k = (int)(e.Args.KeyData);
     if(m_handlers.ContainsKey(k))
         return m_handlers[k](e);
     else
         return HandleResult.Pending;
 }
Exemplo n.º 3
0
        public override HandleResult handleKeyboardEvent(KeyboardInputEvent e)
        {
            HandleResult result = HandleResult.Pending;

            if (m_current_sub != null)
            {
                result = m_current_sub.handleKeyboardEvent(e);
                if (result == HandleResult.Leave)
                    m_current_sub = m_default_sub;
                else if (result == HandleResult.Done)
                    return result;
            }

            result = base.handleKeyboardEvent(e);;

            return result;
        }