Example #1
0
        public override void Draw(SpriteBatchUI spriteBatch)
        {
            int centerWidth = Width - _bgGumps[0].Width - _bgGumps[2].Width;
            int centerHeight = Height - _bgGumps[0].Height - _bgGumps[2].Height;
            int line2Y = Y + _bgGumps[0].Height;
            int line3Y = Y + Height - _bgGumps[6].Height;

            spriteBatch.Draw2D(_bgGumps[0], new Point2D(X, Y), 0, false, false);
            spriteBatch.Draw2DTiled(_bgGumps[1], new Rectangle(X + _bgGumps[0].Width, Y, centerWidth, _bgGumps[0].Height), 0, false, false);
            spriteBatch.Draw2D(_bgGumps[2], new Point2D(X + Width - _bgGumps[2].Width, Y), 0, false, false);

            spriteBatch.Draw2DTiled(_bgGumps[3], new Rectangle(X, line2Y, _bgGumps[0].Width, centerHeight), 0, false, false);
            spriteBatch.Draw2DTiled(_bgGumps[4], new Rectangle(X + _bgGumps[0].Width, line2Y, centerWidth, centerHeight), 0, false, false);
            spriteBatch.Draw2DTiled(_bgGumps[5], new Rectangle(X + Width - _bgGumps[2].Width, line2Y, _bgGumps[2].Width, centerHeight), 0, false, false);

            spriteBatch.Draw2D(_bgGumps[6], new Point2D(X, line3Y), 0, false, false);
            spriteBatch.Draw2DTiled(_bgGumps[7], new Rectangle(X + _bgGumps[0].Width, line3Y, centerWidth, _bgGumps[6].Height), 0, false, false);
            spriteBatch.Draw2D(_bgGumps[8], new Point2D(X + Width - _bgGumps[2].Width, line3Y), 0, false, false);

            base.Draw(spriteBatch);
        }
Example #2
0
 public override void Draw(SpriteBatchUI spriteBatch)
 {
     // up button
     spriteBatch.Draw2D(_btnUpClicked ? _gumpUpButton[1] : _gumpUpButton[0], new Point2D(X, Y), 0, false, false);
     // scrollbar background
     spriteBatch.Draw2D(_gumpBackground[0], new Point2D(X, Y + _gumpUpButton[0].Height), 0, false, false);
     int middlewidth = BarHeight - _gumpUpButton[0].Height - _gumpDownButton[0].Height - _gumpBackground[0].Height - _gumpBackground[2].Height;
     spriteBatch.Draw2DTiled(_gumpBackground[1], new Rectangle(X, Y + _gumpUpButton[0].Height + _gumpBackground[0].Height, _gumpBackground[0].Width, middlewidth), 0, false, false);
     spriteBatch.Draw2D(_gumpBackground[2], new Point2D(X, Y + BarHeight - _gumpDownButton[0].Height - _gumpBackground[2].Height), 0, false, false);
     // down button
     spriteBatch.Draw2D(_btnDownClicked ? _gumpDownButton[1] : _gumpDownButton[0], new Point2D(X, Y + Height - _gumpDownButton[0].Height), 0, false, false);
     // slider
     spriteBatch.Draw2D(_gumpSlider, new Point2D(X + (_gumpBackground[0].Width - _gumpSlider.Width) / 2, Y + _gumpUpButton[0].Height + 1 + (int)_sliderY), 0, false, false);
     base.Draw(spriteBatch);
 }
Example #3
0
 public override void Draw(SpriteBatchUI spriteBatch)
 {
     spriteBatch.Draw2D(_gumpBar[0], Position, 0, false, false);
     spriteBatch.Draw2DTiled(_gumpBar[1], new Rectangle(Area.X + _gumpBar[0].Width, Area.Y, BarWidth - _gumpBar[2].Width - _gumpBar[0].Width, _gumpBar[1].Height), 0, false, false);
     spriteBatch.Draw2D(_gumpBar[2], new Point2D(Area.X + BarWidth - _gumpBar[2].Width, Area.Y), 0, false, false);
     spriteBatch.Draw2D(_gumpSlider, new Point2D(Area.X + _sliderX, Area.Y), 0, false, false);
     base.Draw(spriteBatch);
 }
Example #4
0
 public override void Draw(SpriteBatchUI spriteBatch)
 {
     spriteBatch.Draw2DTiled(_bgGump, new Rectangle(X, Y, Area.Width, Area.Height), 0, false, false);
     base.Draw(spriteBatch);
 }