public override void Draw(DrawContext context)
 {
     // To render the scrolled panel, we just adjust our offset before rendering our child controls as
     // a normal PanelControl
     context.DrawOffset.Y = -scrollTracker.ViewRect.Y;
     base.Draw(context);
 }
예제 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="context"></param>
 public virtual void Draw(DrawContext context)
 {
     Vector2 origin = context.DrawOffset;
     for (int i = 0; i < ChildCount; i++)
     {
         Control child = children[i];
         if (child.Visible)
         {
             context.DrawOffset = origin + child.Position;
             child.Draw(context);
         }
     }
 }
예제 #3
0
        public override void Draw(DrawContext context)
        {
            base.Draw(context);

            context.SpriteBatch.DrawString(font, Text, context.DrawOffset, Color);
        }