show rules to the user

This commit is contained in:
Slavasil 2025-03-23 22:29:28 +03:00
parent 3f1addcadd
commit a2b730df22
3 changed files with 17 additions and 0 deletions

View File

@ -16,6 +16,7 @@ namespace Game {
"WHO WANTS TO BECOME", "WHO WANTS TO BECOME",
"A STOPWATCHIONAIRE", "A STOPWATCHIONAIRE",
"Cannot read/create the game config file because of an unknown error", "Cannot read/create the game config file because of an unknown error",
"Game rules: <no translation> press any key to continue...",
}}, }},
{"ru-RU", new string[] { {"ru-RU", new string[] {
"Не указано ни одного варианта ответа на вопрос", "Не указано ни одного варианта ответа на вопрос",
@ -30,6 +31,7 @@ namespace Game {
"КТО ХОЧЕТ СТАТЬ", "КТО ХОЧЕТ СТАТЬ",
"СЕКУНДОМЕРОМ", "СЕКУНДОМЕРОМ",
"Произошла неизвестная ошибка при чтении/создании файла настроек", "Произошла неизвестная ошибка при чтении/создании файла настроек",
"Правила игры: Вам будет предложено ответить на вопросы. Отвечайте на них правильно и всё будет в шоколаде. Удачи xD! Нажмите любую клавишу, чтобы продолжить",
}} }}
}; };
@ -50,6 +52,7 @@ namespace Game {
TITLE_LINE1, TITLE_LINE1,
TITLE_LINE2, TITLE_LINE2,
ERROR_READ_CONFIG_UNKNOWN, ERROR_READ_CONFIG_UNKNOWN,
RULES,
} }
} }
} }

View File

@ -39,6 +39,10 @@ namespace Game {
return 3; return 3;
} }
display.ShowMainGameScreenBase();
display.DrawRules();
Console.ReadKey();
display.ResetWindow(); display.ResetWindow();
return 0; return 0;

View File

@ -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); 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) { void DrawTitle(int y, int bgColor) {
string text1 = GetMessage(Message.TITLE_LINE1)!; string text1 = GetMessage(Message.TITLE_LINE1)!;
string text2 = GetMessage(Message.TITLE_LINE2)!; string text2 = GetMessage(Message.TITLE_LINE2)!;