Ejemplo n.º 1
0
 public override void Render(Gfx.GBitmap screen)
 {
     if (IsFocused)
     {
         int x = X + GFont.GetStringWidth(Text.Substring(0, _cursorPos), Size);
         if (_cursorShowing > 0)
         {
             screen.DrawLine(Color.White, 2, x, Y, x, Y + Height);
         }
         _cursorShowing--;
         if (_cursorShowing < -8)
         {
             _cursorShowing = 8;
         }
     }
     base.Render(screen);
 }
Ejemplo n.º 2
0
        public override void Render(Gfx.GBitmap screen)
        {
            if (Text != null)
            {
                switch (Alignment)
                {
                case TextAlignment.CenterScreen:
                    GFont.WriteXCenter(screen, Text, Size, Y);
                    break;

                case TextAlignment.Left:
                    GFont.Write(screen, Text, Size, X, Y);
                    break;

                case TextAlignment.Right:
                    GFont.WriteRight(screen, Text, Size, X, Y, Width);
                    break;

                case TextAlignment.Center:
                    GFont.WriteCenter(screen, Text, Size, X, Y, Width);
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 public override void Render(Gfx.GBitmap screen)
 {
     _menu.Render(screen);
     base.Render(screen);
 }