Displaying the condition of contained items in the inventory slot of the parent item (i.e. the amount of oxygen left in a diving suit is visible without highlighting the suit), some debug logging, colored speech bubbles

This commit is contained in:
Regalis
2016-04-21 17:17:32 +03:00
parent e46ec1ade2
commit 12dc494e42
15 changed files with 114 additions and 62 deletions

View File

@@ -27,6 +27,8 @@ namespace Barotrauma
static class DebugConsole
{
const int MaxMessages = 100;
public static List<ColoredText> Messages = new List<ColoredText>();
static bool isOpen;
@@ -600,11 +602,21 @@ namespace Barotrauma
return;
}
if (Messages.Count > MaxMessages)
{
Messages.RemoveRange(0, Messages.Count - MaxMessages);
}
//messages.Add(new ColoredText(msg, color));
selectedIndex = listBox.children.Count;
}
public static void Log(string message)
{
if (GameSettings.VerboseLogging) NewMessage(message, Color.Gray);
}
public static void ThrowError(string error, Exception e = null)
{
if (e != null) error += " {" + e.Message + "}";