public static int Initialize(int width, int height, string lpConsoleTitle = "XConsole", XConsole.PALETTE palette = null, bool cursor = false) { XConsole.SetConsoleTitle(lpConsoleTitle); Console.SetWindowSize(width, height); Console.SetBufferSize(width, height); if (palette != null) { page.Initialize(palette, cursor); } else { page.Initialize(cursor); } bgroundsurface = new Surface(new XConsole.SMALL_COORD(width, height)); bgroundsurface.Clear(XConsole.DEFAULT_STYLE); page.Active(); bgroundviewport = new Viewport(new XConsole.SMALL_RECT(0, 0, width, height)); return(XConsole.GetLastError()); }
//Every page must be active before writing to it. //Unfirtunately avtive=visible so there is no pageflipping public int Active() { XConsole.SetConsoleActiveScreenBuffer(Handle); return(XConsole.GetLastError()); }