Unstable 1.1.14.0
This commit is contained in:
@@ -19,13 +19,14 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private Sprite backgroundSprite;
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch, bool editing, float itemDepth = -1)
|
||||
public void Draw(SpriteBatch spriteBatch, bool editing, float itemDepth = -1, Color? overrideColor = null)
|
||||
{
|
||||
if (backgroundSprite == null) { return; }
|
||||
|
||||
backgroundSprite.DrawTiled(spriteBatch,
|
||||
new Vector2(item.DrawPosition.X - item.Rect.Width / 2 * item.Scale, -(item.DrawPosition.Y + item.Rect.Height / 2)) - backgroundSprite.Origin * item.Scale,
|
||||
new Vector2(backgroundSprite.size.X * item.Scale, item.Rect.Height), color: item.Color,
|
||||
new Vector2(backgroundSprite.size.X * item.Scale, item.Rect.Height),
|
||||
color: overrideColor ?? item.Color,
|
||||
textureScale: Vector2.One * item.Scale,
|
||||
depth: BackgroundSpriteDepth);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user