From a2b730df222019926c4146742118e1f5b24a624a Mon Sep 17 00:00:00 2001 From: Slavasil Date: Sun, 23 Mar 2025 22:29:28 +0300 Subject: [PATCH] show rules to the user --- App/I18n.cs | 3 +++ App/Program.cs | 4 ++++ App/UI/TextDisplay.cs | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/App/I18n.cs b/App/I18n.cs index e8149a3..72bf655 100644 --- a/App/I18n.cs +++ b/App/I18n.cs @@ -16,6 +16,7 @@ namespace Game { "WHO WANTS TO BECOME", "A STOPWATCHIONAIRE", "Cannot read/create the game config file because of an unknown error", + "Game rules: press any key to continue...", }}, {"ru-RU", new string[] { "Не указано ни одного варианта ответа на вопрос", @@ -30,6 +31,7 @@ namespace Game { "КТО ХОЧЕТ СТАТЬ", "СЕКУНДОМЕРОМ", "Произошла неизвестная ошибка при чтении/создании файла настроек", + "Правила игры: Вам будет предложено ответить на вопросы. Отвечайте на них правильно и всё будет в шоколаде. Удачи xD! Нажмите любую клавишу, чтобы продолжить", }} }; @@ -50,6 +52,7 @@ namespace Game { TITLE_LINE1, TITLE_LINE2, ERROR_READ_CONFIG_UNKNOWN, + RULES, } } } \ No newline at end of file diff --git a/App/Program.cs b/App/Program.cs index 0afdedb..4a8b687 100644 --- a/App/Program.cs +++ b/App/Program.cs @@ -39,6 +39,10 @@ namespace Game { return 3; } + display.ShowMainGameScreenBase(); + display.DrawRules(); + Console.ReadKey(); + display.ResetWindow(); return 0; diff --git a/App/UI/TextDisplay.cs b/App/UI/TextDisplay.cs index acbeef4..6194983 100644 --- a/App/UI/TextDisplay.cs +++ b/App/UI/TextDisplay.cs @@ -81,6 +81,16 @@ namespace Game.UI { DrawTextBox(HAlignment.Center, VAlignment.Center, BoxType.Double, windowHeight / 2 + 1, windowWidth / 2 + 1, text, 0xffffff, 0xffffff, 0xfc5d2d, windowWidth / 2); } + public void ShowMainGameScreenBase() { + ClearWithColor(0x5e61ed); + DrawTitle(2, 0x5e61ed); + DrawCopyright(0x5e61ed); + } + + public void DrawRules() { + DrawTextBox(HAlignment.Center, VAlignment.Center, BoxType.Simple, windowHeight / 2 + 1, windowWidth / 2 + 1, GetMessage(Message.RULES), 0x00fcdb, 0x00fcdb, 0x000000, windowWidth * 3 / 4); + } + void DrawTitle(int y, int bgColor) { string text1 = GetMessage(Message.TITLE_LINE1)!; string text2 = GetMessage(Message.TITLE_LINE2)!;