Пример #1
0
 public override void Draw(SpriteBatch b, Point o)
 {
     if (!Visible)
     {
         return;
     }
     // Draw chrome
     FrameworkMenu.DrawMenuRect(b, o.X + Area.X - zoom2, o.Y + Area.Y + zoom15, Area.Width, Area.Height - zoom15);
     // Draw tabs
     for (var c = 0; c < Tabs.Count; c++)
     {
         b.Draw(Game1.mouseCursors, new Rectangle(o.X + Area.X + zoom4 + c * zoom16, o.Y + Area.Y + (c == Current ? zoom2 : 0), zoom16, zoom16), Tab, Color.White);
         b.Draw(Game1.objectSpriteSheet, new Rectangle(o.X + Area.X + zoom8 + c * zoom16, o.Y + Area.Y + zoom5 + (c == Current ? zoom2 : 0), zoom8, zoom8), Game1.getSourceRectForStandardTileSheet(Game1.objectSpriteSheet, Tabs[c].Icon, 16, 16), Color.White);
     }
     // Draw body
     CurrentTab?.Draw(b, new Point(o.X + Area.X + zoom5, o.Y + Area.Y + zoom22));
 }
Пример #2
0
        public override void draw(SpriteBatch b)
        {
            if (DrawChrome)
            {
                DrawMenuRect(b, Area.X, Area.Y, Area.Width, Area.Height);
            }
            Point o = new Point(Area.X + zoom10, Area.Y + zoom10);

            foreach (IMenuComponent el in DrawOrder)
            {
                el.Draw(b, o);
            }
            if (FloatingComponent != null)
            {
                FloatingComponent.Draw(b, o);
            }
            base.draw(b);
            drawMouse(b);
        }