コード例 #1
0
        public override void Draw(SpriteBatch b)
        {
            IClickableMenu.drawTextureBox(b, (int)Position.X - 24, (int)Position.Y - 24, (int)Size.X + 48, (int)Size.Y + 48, Color.White);

            foreach (var row in rows)
            {
                foreach (var element in row)
                {
                    if (element.Position.Y + RowHeight < Position.Y || element.Position.Y > Position.Y + Size.Y)
                    {
                        continue;
                    }
                    if (element == RenderLast)
                    {
                        continue;
                    }
                    element.Draw(b);
                }
            }

            if (RenderLast != null)
            {
                RenderLast.Draw(b);
            }

            Scrollbar.Draw(b);
        }
コード例 #2
0
 public override void Draw(SpriteBatch b)
 {
     foreach (var child in children)
     {
         if (child == RenderLast)
         {
             continue;
         }
         child.Draw(b);
     }
     if (RenderLast != null)
     {
         RenderLast.Draw(b);
     }
 }