Пример #1
0
        private void OnBackKeyDownEvent(int key, params object[] args)
        {
            KeyCodeEventInfo eventInfo = args[0] as KeyCodeEventInfo;

            if (eventInfo == null)
            {
                return;
            }

            for (int i = m_ActivePanelInfoList.Count - 1; i >= 0; --i)
            {
                if (m_ActivePanelInfoList[i].abstractPanel != null)
                {
                    int result = (int)m_ActivePanelInfoList[i].abstractPanel.OnBackKeyDown();
                    if (((result ^ (int)BackKeyCodeResult.PROCESS) & (int)BackKeyCodeResult.PROCESS) == 0)
                    {
                        eventInfo.Process();
                    }

                    if (((result ^ (int)BackKeyCodeResult.BLOCK) & (int)BackKeyCodeResult.BLOCK) == 0)
                    {
                        return;
                    }
                }
            }
        }
Пример #2
0
 private void OnBackKeyDownEvent(int key, params object[] args)
 {
     for (int i = m_ActivePanelInfoList.Count - 1; i >= 0; --i)
     {
         if (m_ActivePanelInfoList[i].abstractPanel != null)
         {
             if (m_ActivePanelInfoList[i].abstractPanel.OnBackKeyDown())
             {
                 KeyCodeEventInfo eventInfo = args[0] as KeyCodeEventInfo;
                 if (eventInfo != null)
                 {
                     eventInfo.Process();
                 }
                 return;
             }
         }
     }
 }