Ejemplo n.º 1
0
        public DebugTextDisplayLine AddLine(string text, Color background, Color foreground)
        {
            var l = new DebugTextDisplayLine(() => text);

            l.SetColor(foreground);
            l.SetBackground(background);
            return(AddLine(l));
        }
Ejemplo n.º 2
0
        public DebugTextDisplayLine AddLine(DebugTextDisplayLine l)
        {
            lines.Add(l);

            lines = lines.OrderBy(n => n.Order).ToList();

            return(l);
        }
Ejemplo n.º 3
0
        public DebugTextDisplayLine AddLineFromAsync(Func <string> text, Color background, Color foreground)
        {
            var l = new DebugTextDisplayLine(text);

            l.SetColor(foreground);
            l.SetBackground(background);
            return(AddLineFromAsync(l));
        }
Ejemplo n.º 4
0
        private static DebugTextDisplayLine CreateLine(SAMLogEntry e)
        {
            DebugTextDisplayLine line;

            switch (e.Level)
            {
            case SAMLogLevel.FATAL_ERROR:
                line = new DebugTextDisplayLine(() => $"[{e.Type}] {e.MessageShort}");
                line.SetBackground(Color.Red);
                line.SetColor(Color.Black);
                return(line);

            case SAMLogLevel.ERROR:
                line = new DebugTextDisplayLine(() => $"[{e.Type}] {e.MessageShort}");
                line.SetBackground(Color.Red * 0.6f);
                line.SetColor(Color.Black);
                return(line);

            case SAMLogLevel.WARNING:
                line = new DebugTextDisplayLine(() => $"[{e.Type}] {e.MessageShort}");
                line.SetBackground(Color.DarkOrange * 0.6f);
                line.SetColor(Color.Black);
                line.SetLifetime(60);
                return(line);

            case SAMLogLevel.INFORMATION:
                line = new DebugTextDisplayLine(() => $"[{e.Type}] {e.MessageShort}");
                line.SetBackground(Color.DodgerBlue * 0.5f);
                line.SetColor(Color.Black);
                line.SetLifetime(30);
                return(line);

            case SAMLogLevel.DEBUG:
                line = new DebugTextDisplayLine(() => $"[{e.Type}] {e.MessageShort}");
                line.SetBackground(Color.GreenYellow * 0.5f);
                line.SetColor(Color.Black);
                line.SetLifetime(5);
                line.SetSpawntime(0.5f);
                line.SetDecaytime(2);
                return(line);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Ejemplo n.º 5
0
		public DebugTextDisplayLine AddLine(DebugTextDisplayLine l)
		{
			lines.Add(l);

			return l;
		}
		public DebugTextDisplayLine AddLine(DebugTextDisplayLine l) => dummy;
Ejemplo n.º 7
0
 public DebugTextDisplayLine AddLineFromAsync(DebugTextDisplayLine l)
 {
     asyncBacklog.Enqueue(l);
     return(l);
 }