(2c1d76ee3) Fixed structure sprites being drawn behind their background sprite if the depth is set higher than the background sprite's depth in the sub editor.

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:38:34 +03:00
parent 6abe73b889
commit a5adf362b8
3 changed files with 91 additions and 98 deletions
@@ -281,7 +281,8 @@ namespace Barotrauma
new Vector2(rect.Width, rect.Height),
color: color,
textureScale: TextureScale * Scale,
startOffset: backGroundOffset);
startOffset: backGroundOffset,
depth: Math.Max(Prefab.BackgroundSprite.Depth, depth + 0.000001f));
if (UseDropShadow)
{
@@ -218,6 +218,22 @@ namespace Barotrauma
return true;
}
private bool RefreshJoinButtonState(GUIComponent component, object obj)
{
if (obj == null || waitingForRefresh) { return false; }
if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text))
{
joinButton.Enabled = true;
}
else
{
joinButton.Enabled = false;
}
return true;
}
private bool SelectServer(GUIComponent component, object obj)
{
if (obj == null || waitingForRefresh) { return false; }