Esempio n. 1
0
        public bool CullRow(int row, ITreeViewGUI gui)
        {
            bool result;

            if (!this.isAnimating)
            {
                result = false;
            }
            else
            {
                if (this.printDebug && row == 0)
                {
                    Console.WriteLine("--------");
                }
                if (row > this.m_Setup.startRow && row <= this.m_Setup.endRow)
                {
                    float num = gui.GetRowRect(row, 1f).y - this.m_Setup.startRowRect.y;
                    if (num > this.m_CurrentClipRect.height)
                    {
                        if (this.m_InsideGUIClip)
                        {
                            this.EndClip();
                        }
                        result = true;
                        return(result);
                    }
                }
                result = false;
            }
            return(result);
        }
 public bool CullRow(int row, ITreeViewGUI gui)
 {
     if (!this.isAnimating)
     {
         return(false);
     }
     if (this.printDebug && row == 0)
     {
         Console.WriteLine("--------");
     }
     if (row <= this.m_Setup.startRow || row > this.m_Setup.endRow || (double)gui.GetRowRect(row, 1f).y - (double)this.m_Setup.startRowRect.y <= (double)this.m_CurrentClipRect.height)
     {
         return(false);
     }
     if (this.m_InsideGUIClip)
     {
         this.EndClip();
     }
     return(true);
 }
Esempio n. 3
0
 public bool CullRow(int row, ITreeViewGUI gui)
 {
     if (this.isAnimating)
     {
         if (this.printDebug && (row == 0))
         {
             Console.WriteLine("--------");
         }
         if ((row > this.m_Setup.startRow) && (row <= this.m_Setup.endRow))
         {
             float num = gui.GetRowRect(row, 1f).y - this.m_Setup.startRowRect.y;
             if (num > this.m_CurrentClipRect.height)
             {
                 if (this.m_InsideGUIClip)
                 {
                     this.EndClip();
                 }
                 return(true);
             }
         }
     }
     return(false);
 }
 public bool CullRow(int row, ITreeViewGUI gui)
 {
     if (this.isAnimating)
     {
         if (this.printDebug && (row == 0))
         {
             Console.WriteLine("--------");
         }
         if ((row > this.m_Setup.startRow) && (row <= this.m_Setup.endRow))
         {
             float num = gui.GetRowRect(row, 1f).y - this.m_Setup.startRowRect.y;
             if (num > this.m_CurrentClipRect.height)
             {
                 if (this.m_InsideGUIClip)
                 {
                     this.EndClip();
                 }
                 return true;
             }
         }
     }
     return false;
 }
Esempio n. 5
0
        // Returns true if row should be culled
        public bool CullRow(int row, ITreeViewGUI gui)
        {
            if (!isAnimating)
            {
                return(false);
            }

            if (printDebug && row == 0)
            {
                Console.WriteLine("--------");
            }

            // Check rows that are inside animation clip rect if they can be culled
            if (row > m_Setup.startRow && row <= m_Setup.endRow)
            {
                Rect rowRect = gui.GetRowRect(row, 1); // we do not care about the width

                // Check row Y local to clipRect
                float rowY = rowRect.y - m_Setup.startRowRect.y;

                if (rowY > m_CurrentClipRect.height)
                {
                    // Ensure to end animation clip since items after
                    // culling should be rendered normally
                    if (m_InsideGUIClip)
                    {
                        EndClip();
                    }

                    return(true);
                }
            }

            // Row is not culled
            return(false);
        }
 public bool CullRow(int row, ITreeViewGUI gui)
 {
   if (!this.isAnimating)
     return false;
   if (this.printDebug && row == 0)
     Console.WriteLine("--------");
   if (row <= this.m_Setup.startRow || row > this.m_Setup.endRow || (double) gui.GetRowRect(row, 1f).y - (double) this.m_Setup.startRowRect.y <= (double) this.m_CurrentClipRect.height)
     return false;
   if (this.m_InsideGUIClip)
     this.EndClip();
   return true;
 }