Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -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);
}