public override void Draw(SpriteBatch b, Point o)
 {
     if (!this.Visible)
     {
         return;
     }
     if (this.Chrome)
     {
         FrameworkMenu.DrawMenuRect(b, this.Area.X + o.X, this.Area.Y + o.Y, this.Area.Width, this.Area.Height);
     }
     else
     {
         IClickableMenu.drawTextureBox(b, this.Texture, this.Crop, this.Area.X + o.X, this.Area.Y + o.Y, this.Area.Width, this.Area.Height, Color.White, Game1.pixelZoom, false);
     }
 }
Esempio n. 2
0
        public override void draw(SpriteBatch b)
        {
            if (this.DrawChrome)
            {
                FrameworkMenu.DrawMenuRect(b, this.Area.X, this.Area.Y, this.Area.Width, this.Area.Height);
            }
            Point o = new Point(this.Area.X + FrameworkMenu.Zoom10, this.Area.Y + FrameworkMenu.Zoom10);

            foreach (IMenuComponent el in this.DrawOrder)
            {
                el.Draw(b, o);
            }
            this.FloatingComponent?.Draw(b, o);
            base.draw(b);
            this.drawMouse(b);
        }
Esempio n. 3
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(Tabs[c].Texture, new Rectangle(o.X + Area.X + zoom8 + c * zoom16, o.Y + Area.Y + zoom5 + (c == Current ? zoom2 : 0), zoom8, zoom8), Tabs[c].Crop, Color.White);
     }
     // Draw body
     CurrentTab?.Draw(b, new Point(o.X + Area.X + zoom5, o.Y + Area.Y + zoom22));
 }
        // IComponentCollection
        protected virtual void UpdateDrawOrder()
        {
            KeyValuePair <List <IInteractiveMenuComponent>, List <IMenuComponent> > sorted = FrameworkMenu.GetOrderedLists(_StaticComponents, _InteractiveComponents);

            DrawOrder  = sorted.Value;
            EventOrder = sorted.Key;
        }
Esempio n. 5
0
        // IComponentCollection
        protected void UpdateDrawOrder()
        {
            KeyValuePair <List <IInteractiveMenuComponent>, List <IMenuComponent> > sorted = FrameworkMenu.GetOrderedLists(this._StaticComponents, this._InteractiveComponents);

            this.DrawOrder  = sorted.Value;
            this.EventOrder = sorted.Key;
        }