Fixed respawn shuttles with no nav terminal throwing an exception, removing focus from server log searchbar when the log window is closed, clients wait for ongoing file transfers to finish before starting a new one (instead of cancelling)

This commit is contained in:
Regalis
2016-08-10 19:18:50 +03:00
parent 69933188d6
commit 7716b5e9d4
5 changed files with 46 additions and 33 deletions

View File

@@ -96,11 +96,17 @@ namespace Barotrauma.Networking
private void AddLine(ColoredText line)
{
var textBlock = new GUITextBlock(new Rectangle(0, 0, 0, 0), line.Text, GUI.Style, Alignment.TopLeft, Alignment.TopLeft, listBox, true, GUI.SmallFont);
float prevSize = listBox.BarSize;
var textBlock = new GUITextBlock(new Rectangle(0, 0, 0, 0), line.Text, GUI.Style, Alignment.TopLeft, Alignment.TopLeft, null, true, GUI.SmallFont);
textBlock.Rect = new Rectangle(textBlock.Rect.X, textBlock.Rect.Y, textBlock.Rect.Width, Math.Max(13, textBlock.Rect.Height));
listBox.AddChild(textBlock);
textBlock.TextColor = line.Color;
textBlock.CanBeFocused = false;
if ((prevSize == 1.0f && listBox.BarScroll == 0.0f) || (prevSize < 1.0f && listBox.BarScroll == 1.0f)) listBox.BarScroll = 1.0f;
}
private bool FilterMessages(GUITextBox textBox, string text)