public static RootConsoleWindow Setup(int width, int height, string windowTitle, bool isFullscreen, ConsoleRender render, CustomFontRequest font = null) { if (Instance != null) { throw new InvalidOperationException("Can not setup RootConsole twice"); } if (font == null) { Instance = new RootConsoleWindow(new Size(width, height), windowTitle, isFullscreen, render); } else { Instance = new RootConsoleWindow(new Size(width, height), windowTitle, isFullscreen, font, render); } return(Instance); }
private RootConsoleWindow(Size s, String title, bool fullscreen, CustomFontRequest font, ConsoleRender renderer) : base(IntPtr.Zero, s.Width, s.Height) { TCOD_console_set_custom_font(font.FontFile, (int)font.FontRequestType, font.NumberHorizontalChars, font.NumberVerticalChars); TCOD_console_init_root(s.Width, s.Height, title, fullscreen, renderer); }