Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawPanel()

static void Terraria.Utils.DrawPanel ( Texture2D texture,
int edgeWidth,
int edgeShove,
SpriteBatch spriteBatch,
Vector2 position,
float width,
Color color )
inlinestatic

Definition at line 1995 of file Utils.cs.

1996 {
1997 spriteBatch.Draw(texture, position, new Rectangle(0, 0, edgeWidth, texture.Height), color);
1998 spriteBatch.Draw(texture, new Vector2(position.X + (float)edgeWidth, position.Y), new Rectangle(edgeWidth + edgeShove, 0, texture.Width - (edgeWidth + edgeShove) * 2, texture.Height), color, 0f, Vector2.Zero, new Vector2((width - (float)(edgeWidth * 2)) / (float)(texture.Width - (edgeWidth + edgeShove) * 2), 1f), SpriteEffects.None, 0f);
1999 spriteBatch.Draw(texture, new Vector2(position.X + width - (float)edgeWidth, position.Y), new Rectangle(texture.Width - edgeWidth, 0, edgeWidth, texture.Height), color);
2000 }
void Draw(Texture2D texture, Vector2 position, Color color)

References Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Microsoft.Xna.Framework.Graphics.Texture2D.Height, Microsoft.Xna.Framework.Graphics.Vector2, Microsoft.Xna.Framework.Graphics.Texture2D.Width, Microsoft.Xna.Framework.Vector2.X, Microsoft.Xna.Framework.Vector2.Y, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.GameContent.UI.Elements.UIHorizontalSeparator.DrawSelf(), Terraria.Utils.DrawSettings2Panel(), and Terraria.Utils.DrawSettingsPanel().