Exemplo n.º 1
0
        private static void Draw()
        {
            // Draw console background
            GL.BindTexture(GL.GL_TEXTURE_2D, _ConsoleBackground.GLTextureNumber);
            GL.Begin(GL.GL_QUADS);
            GL.Color4f(0.0f, 0.0f, 0.0f, 0.0f);         // Black, transparent
            GL.TexCoord2f(0.0f, 0.0f); GL.Vertex2f(0.0f, 0.0f);
            GL.TexCoord2f(0.0f, 1.0f); GL.Vertex2f(0.0f, _ScreenHeight);
            GL.TexCoord2f(1.0f, 1.0f); GL.Vertex2f(_ScreenWidth, _ScreenHeight);
            GL.TexCoord2f(1.0f, 0.0f); GL.Vertex2f(_ScreenWidth, 0.0f);
            GL.End();

            // Draw text lines
            DrawLines(_TopLineIndex, _BottomLineIndex);

            // Write the console input character
            if (String.IsNullOrEmpty(ConsoleLogManager.ReadBuffer()))
            {
                Write("> ");
            }

            // Draw text input line, because we have initially a long OpenGL loading log, the cursor is always at the last line
            DrawLine((uint)(_LinesPerScreen * 8), ConsoleLogManager.ReadBuffer());

            // Set the cursor position for text input
            _CursorPosX = (ushort)ConsoleLogManager.GetBufferLength();
            _CursorPosY = _LinesPerScreen;
        }
Exemplo n.º 2
0
        public static void Write(string Line)
        {
            ConsoleLogManager.Write(Line);

            // Set the cursor position for text input
            _CursorPosX = (ushort)ConsoleLogManager.GetBufferLength();
            _CursorPosY = _LinesPerScreen;
        }