Exemplo n.º 1
0
 private static bool RecurseDoubleClick(int X, int Y, Gump g, int mX, int mY)
 {
     if (g.Visible && (g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height))))))
     {
         Gump[] gumpArray = g.Children.ToArray();
         for (int i = gumpArray.Length - 1; i >= 0; i--)
         {
             Gump gump = gumpArray[i];
             if (RecurseDoubleClick(X + gump.X, Y + gump.Y, gump, mX, mY))
             {
                 return true;
             }
         }
         if (!g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height)))))
         {
             if ((m_Modal == null) && g.HitTest(mX - X, mY - Y))
             {
                 if (m_TextFocus != null)
                 {
                     m_TextFocus.Unfocus();
                     m_TextFocus = null;
                 }
                 g.OnDoubleClick(mX - X, mY - Y);
                 return true;
             }
             if (((m_Modal != null) && g.IsChildOf(m_Modal)) && g.HitTest(mX - X, mY - Y))
             {
                 if (m_TextFocus != null)
                 {
                     m_TextFocus.Unfocus();
                     m_TextFocus = null;
                 }
                 g.OnDoubleClick(mX - X, mY - Y);
                 return true;
             }
         }
     }
     return false;
 }