Re-enabled repairtool character damage

This commit is contained in:
Regalis
2016-02-13 21:24:41 +02:00
parent 08f1d05507
commit 9b5e78fce4
4 changed files with 31 additions and 7 deletions
+12
View File
@@ -205,6 +205,18 @@ 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" >
DrawRectangle(sb, new Vector2(start.X, -start.Y), size, new Color(0.5f, 0.57f, 0.6f, 1.0f), 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),
clr, true, depth);
}
public static Texture2D CreateCircle(int radius)
{
int outerRadius = radius * 2 + 2; // So circle doesn't go out of bounds