public override void Init() { base.Init(); (width, height) = ConsoleRenderer.GetConsoleSize(); (centerX, centerY) = ConsoleRenderer.GetWindowCenter(); InitStart(); ConsoleInput.KeyPressed += OnKeyPressed; ConsoleInput.MousePressed += OnMousePressed; ConsoleInput.MouseDoubleClick += OnMousePressed; //DrawComponents(); Renderer.DrawMainTitle(); //Cursor = true; }
public override void Init() { base.Init(); var(width, height) = ConsoleRenderer.GetConsoleSize(); border = new SingleBorder(); border.Left = -1; border.Top = -1; border.Width = 20; border.Height = height + 2; border.Hide(); //Components.Add(border); ConsoleInput.KeyPressed += OnKeyPressed; }
public static void DrawMainTitle() { //var title = new string[] //{ // " /$$$$$$ /$$ /$$$$$$$ /$$ ", // " /$$__ÖÖ$$ | $$ | $$__ $$ | $$ ", // "|Ö$$ \\__/ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$ | $$ /$$$$$$ | $$ \\ $$ /$$$$$$ | $$ /$$ /$$$$$$ /$$$$$$ ", // "|Ö$$ /$$ÖÖÖÖ$$|Ö$$__ÖÖ$$ /$$_____/ /$$__ $$| $$ /$$__ $$ | $$$$$$$//$$__ $$| $$ /$$/ /$$__ $$ /$$__ $$", // "|Ö$$ |Ö$$ \\Ö$$|Ö$$ \\Ö$$|ÖÖ$$$$$$ | $$ \\ $$| $$| $$$$$$$$ | $$____/| $$ \\ $$| $$$$$$/ | $$$$$$$$| $$ \\__/", // "|Ö$$ $$|Ö$$ |Ö$$|Ö$$ |Ö$$ \\____ÖÖ$$| $$ | $$| $$| $$_____/ | $$ | $$ | $$| $$_ $$ | $$_____/| $$ ", // "|ÖÖ$$$$$$/|ÖÖ$$$$$$/|Ö$$ |Ö$$ /$$$$$$$/| $$$$$$/| $$| $$$$$$$ | $$ | $$$$$$/| $$ \\ $$| $$$$$$$| $$ ", // " \\______/ \\______/ |__/ |__/|_______/ \\______/ |__/ \\_______/ |__/ \\______/ |__/ \\__/ \\_______/|__/ ", //}; var title = new string[] { " /$$$$$$ /$$ /$$$$$$$ /$$ ", " /$$__ÖÖ$$ |Ö$$ |Ö$$__ÖÖ$$ |Ö$$ ", "|Ö$$ \\__/ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$ |Ö$$ /$$$$$$ |Ö$$ \\Ö$$ /$$$$$$ |Ö$$ /$$ /$$$$$$ /$$$$$$ ", "|Ö$$ /$$ÖÖÖÖ$$|Ö$$__ÖÖ$$ /$$_____/ /$$__ÖÖ$$|Ö$$ /$$__ÖÖ$$ |Ö$$$$$$$//$$__ÖÖ$$|Ö$$ /$$/ /$$__ÖÖ$$ /$$__ÖÖ$$", "|Ö$$ |Ö$$ \\Ö$$|Ö$$ \\Ö$$|ÖÖ$$$$$$ |Ö$$ \\Ö$$|Ö$$|Ö$$$$$$$$ |Ö$$____/|Ö$$ \\Ö$$|Ö$$$$$$/ |Ö$$$$$$$$|Ö$$ \\__/", "|Ö$$ $$|Ö$$ |Ö$$|Ö$$ |Ö$$ \\____ÖÖ$$|Ö$$ |Ö$$|Ö$$|Ö$$_____/ |Ö$$ |Ö$$ |Ö$$|Ö$$_ÖÖ$$ |Ö$$_____/|Ö$$ ", "|ÖÖ$$$$$$/|ÖÖ$$$$$$/|Ö$$ |Ö$$ /$$$$$$$/|ÖÖ$$$$$$/|Ö$$|ÖÖ$$$$$$$ |Ö$$ |ÖÖ$$$$$$/|Ö$$ \\ÖÖ$$|Ö $$$$$$$|Ö$$ ", " \\______/ \\______/ |__/ |__/|_______/ \\______/ |__/ \\_______/ |__/ \\______/ |__/ \\__/ \\_______/|__/ ", }; var(windowWidth, windowHeight) = ConsoleRenderer.GetConsoleSize(); //var sw = Stopwatch.StartNew(); //ConsoleRenderer.Draw(title, new DrawArgs( // windowWidth / 2 - title[0].Length / 2, // windowHeight / 4 - title.Length / 2, // CharAttribute.ForegroundGreen, // true //)); //sw.Stop(); //Debug.WriteLine(sw.ElapsedMilliseconds); //ConsoleRenderer.DrawStrings( // title, // windowWidth / 2 - title[0].Length / 2, // windowHeight / 4 - title.Length / 2, // CharAttribute.ForegroundGreen //); }