public override void Draw(GameTime gameTime) { GuiHelper.PushScissor(Clip); GuiHelper.SpriteBatch.FillRectangle(Bounds, Color.Black); GuiHelper.SpriteBatch.FillRectangle(new RectangleF(Left, Bottom - 20, Width, 20), Color.White * 0.5f); GuiHelper.PopScissor(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { GuiHelper.PushScissor(Clip); int halfWidth = (int)(Width / 2); int iconHalfWidth = (int)(PrefWidth / 2); int halfHeight = (int)(Height / 2); int iconHalfHeight = (int)(PrefHeight / 2); Vector2 pos = new Vector2(Left + halfWidth - iconHalfWidth, Top + halfHeight - iconHalfHeight); GuiHelper.SpriteBatch.Draw(Region, pos, Color.White); GuiHelper.PopScissor(); }