Merge branch 'walldamage'
This commit is contained in:
@@ -273,12 +273,15 @@ namespace Barotrauma
|
||||
|
||||
public static void DrawProgressBar(SpriteBatch sb, Vector2 start, Vector2 size, float progress, Color clr, float depth = 0.0f)
|
||||
{
|
||||
//outlinecolor = "0.5, 0.57, 0.6, 1.0" >
|
||||
DrawProgressBar(sb, start, size, progress, clr, new Color(0.5f, 0.57f, 0.6f, 1.0f), depth);
|
||||
}
|
||||
|
||||
DrawRectangle(sb, new Vector2(start.X, -start.Y), size, new Color(0.5f, 0.57f, 0.6f, 1.0f), false, depth);
|
||||
public static void DrawProgressBar(SpriteBatch sb, Vector2 start, Vector2 size, float progress, Color clr, Color outlineColor, float depth = 0.0f)
|
||||
{
|
||||
DrawRectangle(sb, new Vector2(start.X, -start.Y), size, outlineColor, false, depth);
|
||||
|
||||
int padding = 2;
|
||||
DrawRectangle(sb, new Rectangle((int)start.X + padding, -(int)(start.Y - padding), (int)((size.X - padding * 2)*progress), (int)size.Y - padding * 2),
|
||||
DrawRectangle(sb, new Rectangle((int)start.X + padding, -(int)(start.Y - padding), (int)((size.X - padding * 2) * progress), (int)size.Y - padding * 2),
|
||||
clr, true, depth);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user