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

◆ DrawFilling2()

void Terraria.GameContent.UI.Elements.UIGenProgressBar.DrawFilling2 ( SpriteBatch spritebatch,
Vector2 topLeft,
int height,
int completedWidth,
int totalWidth,
Color filled,
Color separator,
Color empty )
inlineprivate

Definition at line 109 of file UIGenProgressBar.cs.

110 {
111 if (completedWidth % 2 != 0)
112 {
113 completedWidth--;
114 }
115 spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int)topLeft.X, (int)topLeft.Y, completedWidth, height), new Rectangle(0, 0, 1, 1), filled);
116 spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int)topLeft.X + completedWidth, (int)topLeft.Y, totalWidth - completedWidth, height), new Rectangle(0, 0, 1, 1), empty);
117 spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int)topLeft.X + completedWidth - 2, (int)topLeft.Y, 2, height), new Rectangle(0, 0, 1, 1), separator);
118 }
void Draw(Texture2D texture, Vector2 position, Color color)

References Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Terraria.GameContent.TextureAssets.MagicPixel, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.

Referenced by Terraria.GameContent.UI.Elements.UIGenProgressBar.DrawSelf().