Beispiel #1
0
        public void Log(FancyText text)
        {
            Logs.Insert(0, text);
            var lines = text.GetLines();

            Lines.InsertRange(0, lines);
            if (Scroll > 0)
            {
                Scroll += lines.Count;
            }
        }
Beispiel #2
0
        public void Log(FancyText text)
        {
            Console.CursorVisible = false;
            var top = Math.Max(0, Console.CursorTop);

            Console.SetCursorPosition(0, top);
            Console.Write(new string(' ', ConsoleUtils.Width - 1));
            Console.SetCursorPosition(0, top);
            text.SetNext(new FancyText("\n", FancyColor.Reset));
            text.PrintNext(GuiApp.ConsoleColors);

            Console.SetCursorPosition(0, Math.Max(0, top + text.GetLines(ConsoleUtils.Width).Count));
            SetCursorPos();
        }