Exemple #1
0
        public void DrawToPane(Pane p)
        {
            var x = p.Origin.X;
            var y = p.Origin.Y;


            for (var i = 0; i < Lines.Count; i++)
            {
                var line = Lines[i];
                DrawBuffer.DrawString(Color.White, line, FontSize, x, y);
                y += FontSize;
            }

            x = p.Origin.X;
            y = p.Origin.Y;


            for (var i = 0; i < Lines.Count; i++)
            {
                var line = Lines[i];

                y += FontSize;

                if (i == Line)
                {
                    var size = DrawBuffer.MesureString(Col != line.Length ? line.Remove(Col) : line, FontSize);
                    if (DateTime.Now.Millisecond >= 500)
                    {
                        DrawBuffer.DrawRect(Color.White, x + size.Width, y - FontSize + 2, 2, FontSize);
                    }

                    //@HACK @TMP just to test
                    var words = line[..Col].Split(' ');