Merge remote-tracking branch 'barotrauma/master' into new-netcode
# Conflicts: # Subsurface/Properties/AssemblyInfo.cs # Subsurface/Source/Characters/AI/EnemyAIController.cs # Subsurface/Source/Characters/AICharacter.cs # Subsurface/Source/Characters/Character.cs # Subsurface/Source/Items/Components/Signal/Connection.cs # Subsurface/Source/Items/Item.cs # Subsurface/Source/Map/Structure.cs # Subsurface/Source/Networking/GameClient.cs # Subsurface/Source/Networking/GameServer.cs # Subsurface/Source/Screens/NetLobbyScreen.cs
This commit is contained in:
@@ -64,6 +64,15 @@ namespace Barotrauma
|
||||
textBox = new GUITextBox(new Rectangle(0,0,0,20), Color.Black, Color.White, Alignment.BottomLeft, Alignment.Left, GUI.Style, frame);
|
||||
textBox.Color = Color.Black * 0.7f;
|
||||
|
||||
//messages already added before initialization -> add them to the listbox
|
||||
List<ColoredText> unInitializedMessages = new List<ColoredText>(Messages);
|
||||
Messages.Clear();
|
||||
|
||||
foreach (ColoredText msg in unInitializedMessages)
|
||||
{
|
||||
NewMessage(msg.Text, msg.Color);
|
||||
}
|
||||
|
||||
NewMessage("Press F3 to open/close the debug console", Color.Cyan);
|
||||
NewMessage("Enter \"help\" for a list of available console commands", Color.Cyan);
|
||||
|
||||
@@ -740,6 +749,14 @@ namespace Barotrauma
|
||||
|
||||
Messages.Add(new ColoredText(msg, color));
|
||||
|
||||
if (Messages.Count > MaxMessages)
|
||||
{
|
||||
Messages.RemoveRange(0, Messages.Count - MaxMessages);
|
||||
}
|
||||
|
||||
//listbox not created yet, don't attempt to add
|
||||
if (listBox == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
var textBlock = new GUITextBlock(new Rectangle(0, 0, listBox.Rect.Width, 0), msg, GUI.Style, Alignment.TopLeft, Alignment.Left, null, true, GUI.SmallFont);
|
||||
@@ -753,14 +770,7 @@ namespace Barotrauma
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Messages.Count > MaxMessages)
|
||||
{
|
||||
Messages.RemoveRange(0, Messages.Count - MaxMessages);
|
||||
}
|
||||
|
||||
//messages.Add(new ColoredText(msg, color));
|
||||
|
||||
|
||||
selectedIndex = listBox.children.Count;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user