public override void Draw(SpriteBatchUI spriteBatch) { int centerWidth = Width - m_bgGumps[0].Width - m_bgGumps[2].Width; int centerHeight = Height - m_bgGumps[0].Height - m_bgGumps[2].Height; int line2Y = Y + m_bgGumps[0].Height; int line3Y = Y + Height - m_bgGumps[6].Height; spriteBatch.Draw2D(m_bgGumps[0], new Point(X, Y), 0, false, false); spriteBatch.Draw2DTiled(m_bgGumps[1], new Rectangle(X + m_bgGumps[0].Width, Y, centerWidth, m_bgGumps[0].Height), 0, false, false); spriteBatch.Draw2D(m_bgGumps[2], new Point(X + Width - m_bgGumps[2].Width, Y), 0, false, false); spriteBatch.Draw2DTiled(m_bgGumps[3], new Rectangle(X, line2Y, m_bgGumps[0].Width, centerHeight), 0, false, false); spriteBatch.Draw2DTiled(m_bgGumps[4], new Rectangle(X + m_bgGumps[0].Width, line2Y, centerWidth, centerHeight), 0, false, false); spriteBatch.Draw2DTiled(m_bgGumps[5], new Rectangle(X + Width - m_bgGumps[2].Width, line2Y, m_bgGumps[2].Width, centerHeight), 0, false, false); spriteBatch.Draw2D(m_bgGumps[6], new Point(X, line3Y), 0, false, false); spriteBatch.Draw2DTiled(m_bgGumps[7], new Rectangle(X + m_bgGumps[0].Width, line3Y, centerWidth, m_bgGumps[6].Height), 0, false, false); spriteBatch.Draw2D(m_bgGumps[8], new Point(X + Width - m_bgGumps[2].Width, line3Y), 0, false, false); base.Draw(spriteBatch); }
public override void Draw(SpriteBatchUI spriteBatch) { spriteBatch.Draw2DTiled(m_bgGump, new Rectangle(X, Y, Area.Width, Area.Height), 0, false, false); base.Draw(spriteBatch); }
public override void Draw(SpriteBatchUI spriteBatch) { // up button spriteBatch.Draw2D(m_btnUpClicked ? m_gumpUpButton[1] : m_gumpUpButton[0], new Point(X, Y), 0, false, false); // scrollbar background spriteBatch.Draw2D(m_gumpBackground[0], new Point(X, Y + m_gumpUpButton[0].Height), 0, false, false); int middlewidth = BarHeight - m_gumpUpButton[0].Height - m_gumpDownButton[0].Height - m_gumpBackground[0].Height - m_gumpBackground[2].Height; spriteBatch.Draw2DTiled(m_gumpBackground[1], new Rectangle(X, Y + m_gumpUpButton[0].Height + m_gumpBackground[0].Height, m_gumpBackground[0].Width, middlewidth), 0, false, false); spriteBatch.Draw2D(m_gumpBackground[2], new Point(X, Y + BarHeight - m_gumpDownButton[0].Height - m_gumpBackground[2].Height), 0, false, false); // down button spriteBatch.Draw2D(m_btnDownClicked ? m_gumpDownButton[1] : m_gumpDownButton[0], new Point(X, Y + Height - m_gumpDownButton[0].Height), 0, false, false); // slider spriteBatch.Draw2D(m_gumpSlider, new Point(X + (m_gumpBackground[0].Width - m_gumpSlider.Width) / 2, Y + m_gumpUpButton[0].Height + 1 + (int)m_sliderY), 0, false, false); base.Draw(spriteBatch); }