Esempio n. 1
0
        public override void Draw(GameTime gameTime)
        {
            GuiHelper.SetScissor(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.ResetScissor();
        }
Esempio n. 2
0
 /// <summary>
 /// Cleans up the drawing limits that were set by SetScissor.
 /// </summary>
 public virtual void ResetScissor()
 {
     GuiHelper.ResetScissor(_oldScissor);
 }