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

◆ DrawInvBG() [2/3]

static void Terraria.Utils.DrawInvBG ( SpriteBatch sb,
int x,
int y,
int w,
int h,
Color c = default(Color) )
inlinestatic

Definition at line 1931 of file Utils.cs.

1932 {
1933 if (c == default(Color))
1934 {
1935 c = new Color(63, 65, 151, 255) * 0.785f;
1936 }
1938 if (w < 20)
1939 {
1940 w = 20;
1941 }
1942 if (h < 20)
1943 {
1944 h = 20;
1945 }
1946 sb.Draw(value, new Rectangle(x, y, 10, 10), new Rectangle(0, 0, 10, 10), c);
1947 sb.Draw(value, new Rectangle(x + 10, y, w - 20, 10), new Rectangle(10, 0, 10, 10), c);
1948 sb.Draw(value, new Rectangle(x + w - 10, y, 10, 10), new Rectangle(value.Width - 10, 0, 10, 10), c);
1949 sb.Draw(value, new Rectangle(x, y + 10, 10, h - 20), new Rectangle(0, 10, 10, 10), c);
1950 sb.Draw(value, new Rectangle(x + 10, y + 10, w - 20, h - 20), new Rectangle(10, 10, 10, 10), c);
1951 sb.Draw(value, new Rectangle(x + w - 10, y + 10, 10, h - 20), new Rectangle(value.Width - 10, 10, 10, 10), c);
1952 sb.Draw(value, new Rectangle(x, y + h - 10, 10, 10), new Rectangle(0, value.Height - 10, 10, 10), c);
1953 sb.Draw(value, new Rectangle(x + 10, y + h - 10, w - 20, 10), new Rectangle(10, value.Height - 10, 10, 10), c);
1954 sb.Draw(value, new Rectangle(x + w - 10, y + h - 10, 10, 10), new Rectangle(value.Width - 10, value.Height - 10, 10, 10), c);
1955 }
void Draw(Texture2D texture, Vector2 position, Color color)
static Asset< Texture2D > InventoryBack13

References Microsoft.Xna.Framework.Graphics.Color, Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Terraria.GameContent.TextureAssets.InventoryBack13, and System.value.