diff --git a/App/I18n.cs b/App/I18n.cs index be429e9..593163e 100644 --- a/App/I18n.cs +++ b/App/I18n.cs @@ -13,6 +13,8 @@ namespace Game { "Syntax error in the question database: {0} (line {1} column {2})", "Cannot get console mode", "Cannot set console mode", + "WHO WANTS TO BECOME", + "A STOPWATCHIONAIRE" }}, {"ru-RU", new string[] { "Не указано ни одного варианта ответа на вопрос", @@ -24,6 +26,8 @@ namespace Game { "Ошибка синтаксиса в банке вопросов: {0} (строка {1} символ {2})", "Не удалось узнать режим консоли", "Не удалось установить режим консоли", + "КТО ХОЧЕТ СТАТЬ", + "СЕКУНДОМЕРОМ" }} }; @@ -41,6 +45,8 @@ namespace Game { SYNTAX_ERROR, ERROR_GETCONSOLEMODE, ERROR_SETCONSOLEMODE, + TITLE_LINE1, + TITLE_LINE2, } } } \ No newline at end of file diff --git a/App/UI/TextDisplay.cs b/App/UI/TextDisplay.cs index 982fb27..acbeef4 100644 --- a/App/UI/TextDisplay.cs +++ b/App/UI/TextDisplay.cs @@ -82,8 +82,8 @@ namespace Game.UI { } void DrawTitle(int y, int bgColor) { - string text1 = "КТО ХОЧЕТ СТАТЬ"; - string text2 = "СЕКУНДОМЕРОМ"; + string text1 = GetMessage(Message.TITLE_LINE1)!; + string text2 = GetMessage(Message.TITLE_LINE2)!; SetColors(0xffffff, 0); int text1Start = (windowWidth - text1.Length) / 2 + 1; @@ -200,10 +200,12 @@ namespace Game.UI { if (fg != -1) { (int r, int g, int b) = ((fg >> 16) & 255, (fg >> 8) & 255, fg & 255); command.Append(RGB_FG_SEQ_START + r + ';' + g + ';' + b + GRAPHICS_SEQ_END); + currentFgColor = fg; } if (bg != -1) { (int r, int g, int b) = ((bg >> 16) & 255, (bg >> 8) & 255, bg & 255); command.Append(RGB_BG_SEQ_START + r + ';' + g + ';' + b + GRAPHICS_SEQ_END); + currentBgColor = bg; } Console.Write(command.ToString()); } @@ -215,7 +217,10 @@ namespace Game.UI { } public void SetCursor(int row, int column) { + if (cursorRow == row && cursorCol == column) return; Console.Write(ESC_SEQ_START + row + ';' + column + SETCURSOR_END); + cursorRow = row; + cursorCol = column; } public void HideCursor() {