Use a single method with optional parameters for drawing tiled textures.

This commit is contained in:
itchyOwl
2018-04-06 11:54:41 +03:00
parent e89fa0dc5c
commit b86b8cd377
10 changed files with 45 additions and 153 deletions
@@ -402,7 +402,7 @@ namespace Barotrauma
if (uiSprite.Sprite.size.X == 0.0f) size.X = rect.Width;
if (uiSprite.Sprite.size.Y == 0.0f) size.Y = rect.Height;
uiSprite.Sprite.DrawTiled(spriteBatch, startPos, size, currColor * (currColor.A / 255.0f));
uiSprite.Sprite.DrawTiled(spriteBatch, startPos, size, color: currColor * (currColor.A / 255.0f));
}
else
{
@@ -105,7 +105,7 @@ namespace Barotrauma
{
if (uiSprite.Tile)
{
uiSprite.Sprite.DrawTiled(spriteBatch, slider.Rect.Location.ToVector2(), slider.Rect.Size.ToVector2(), currColor);
uiSprite.Sprite.DrawTiled(spriteBatch, slider.Rect.Location.ToVector2(), slider.Rect.Size.ToVector2(), color: currColor);
}
else
{