Skip to content

Commit afa1b83

Browse files
committed
Made the window help text a little different
1 parent ee7bcb7 commit afa1b83

File tree

1 file changed

+35
-24
lines changed

1 file changed

+35
-24
lines changed

src/Interface/WindowGameHelp.cpp

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
WindowGameHelp::WindowGameHelp()
99
{
1010
int width = 40;
11-
int height = 15;
11+
int height = 17;
1212

1313
int windowx = Layout::screenWidth/2 - width/2;
1414
int windowy = Layout::screenHeight/2 - height/2;
@@ -69,23 +69,18 @@ void WindowGameHelp::run()
6969
// Help Window
7070
if (activatedIndex == 0)
7171
{
72-
this->windows[0]->print(Utils::String::split("nSnake is the classical snake game\n"
73-
"on the terminal.", '\n'),
72+
this->windows[0]->print("In-game controls:\n",
7473
0, 0,
75-
Globals::Theme::text);
76-
77-
this->windows[0]->print("Controls:",
78-
0, 3,
7974
Globals::Theme::hilite_text);
8075

81-
this->windows[0]->print(Utils::String::split(" Move up\n"
82-
" Move down\n"
83-
" Move left\n"
84-
" Move right\n"
85-
" Pause game\n"
86-
" Quit anytime\n"
87-
" Show help", '\n'),
88-
10, 3,
76+
this->windows[0]->print(Utils::String::split("Move up\n"
77+
"Move down\n"
78+
"Move left\n"
79+
"Move right\n"
80+
"Pause game\n"
81+
"Quit anytime\n"
82+
"Show help", '\n'),
83+
1, 1,
8984
Globals::Theme::hilite_text);
9085

9186
this->windows[0]->print(Utils::String::split(InputManager::keyToString(InputManager::getBind("up")) + "\n" +
@@ -95,12 +90,26 @@ void WindowGameHelp::run()
9590
InputManager::keyToString(InputManager::getBind("pause")) + "\n" +
9691
InputManager::keyToString(InputManager::getBind("quit")) + "\n" +
9792
InputManager::keyToString(InputManager::getBind("help")), '\n'),
98-
24, 3,
93+
14, 1,
94+
Globals::Theme::text);
95+
96+
this->windows[0]->print("Menu controls:\n",
97+
0, 9,
98+
Globals::Theme::hilite_text);
99+
100+
this->windows[0]->print(Utils::String::split("First item\n"
101+
"Last item", '\n'),
102+
1, 10,
103+
Globals::Theme::hilite_text);
104+
105+
this->windows[0]->print(Utils::String::split("page up\n"
106+
"page down", '\n'),
107+
14, 10,
99108
Globals::Theme::text);
100109

101110
this->windows[0]->print(Utils::String::split(" Settings and scores are stored at:\n"
102-
" ~/.local/share/nsnake/", '\n'),
103-
0, 11,
111+
" `~/.local/share/nsnake/`", '\n'),
112+
0, 13,
104113
Globals::Theme::text);
105114
}
106115
//
@@ -116,15 +125,17 @@ void WindowGameHelp::run()
116125
0, 3,
117126
Colors::pair(COLOR_GREEN, COLOR_DEFAULT, true));
118127

119-
this->windows[1]->print(Utils::String::split("\n"
120-
"nSnake was made by Alexandre Dantas,\n"
121-
"contact him at <[email protected]>\n"
128+
this->windows[1]->print(Utils::String::split("Try `nsnake --help` and `man nsnake`\n"
122129
"\n"
130+
"Game made by Alexandre Dantas,\n"
131+
"contact him at <[email protected]>\n"
123132
"Thanks for playing this game :)\n"
124133
"\n"
125-
"http://nsnake.alexdantas.net/\n"
126-
"https://github.com/alexdantas/nsnake/", '\n'),
127-
1, 5, Globals::Theme::text);
134+
"Homepage:\n"
135+
" http://nsnake.alexdantas.net/\n"
136+
"Source Code:\n"
137+
" https://github.com/alexdantas/nsnake/", '\n'),
138+
0, 5, Globals::Theme::text);
128139
}
129140

130141
this->windows[activatedIndex]->refresh();

0 commit comments

Comments
 (0)