internal void Add(Message msg) { this.lst.Add(msg); if (this.Level < msg.Level) { this.Level = msg.Level; } }
/// <summary> /// Adds a message to the display /// </summary> /// <param name="text">The text of the message</param> /// <param name="severity">Affects the color of the message</param> /// <param name="keepForSeconds">Duration the message stays on screen. Set to 0.0f to keep the message there until remove using Remove</param> /// <returns></returns> public Message Add(string text, Message.Severity severity = Message.Severity.Info, float keepForSeconds = -1.0f) { // Create a message var message = new Message(); message.severity = severity; message.text = text; message.keepForSeconds = keepForSeconds; Add(message); return(message); }
private void Add(string msg, Message.Severity lvl, string src) { this.Add(new Message(msg, lvl, src)); }