-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remade Help Windows (had nsnakes helps, oops)
- Loading branch information
1 parent
13aa712
commit cb4eeea
Showing
5 changed files
with
79 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
|
||
WindowGameHelp::WindowGameHelp() | ||
{ | ||
int width = 40; | ||
int height = 15; | ||
int width = 50; | ||
int height = 20; | ||
|
||
int windowx = Layout::screenWidth/2 - width/2; | ||
int windowy = Layout::screenHeight/2 - height/2; | ||
|
@@ -68,62 +68,75 @@ void WindowGameHelp::run() | |
// Help Window | ||
if (activatedIndex == 0) | ||
{ | ||
this->windows[0]->print_multiline("nSnake is the classical snake game\n" | ||
"on the terminal.\n", | ||
0, 0, | ||
this->windows[0]->print_multiline("yetris: customizable Tetris(tm) clone\n" | ||
" for the terminal.\n", | ||
1, 1, | ||
Globals::Profiles::current->settings.theme.text); | ||
|
||
this->windows[0]->print_multiline("Controls:\n", | ||
0, 3, Globals::Profiles::current->settings.theme.hilite_text); | ||
|
||
this->windows[0]->print_multiline(" Move up\n" | ||
" Move down\n" | ||
" Move left\n" | ||
" Move right\n" | ||
" Pause game\n" | ||
" Quit anytime\n" | ||
" Show help\n", | ||
10, 3, | ||
1, 4, Globals::Profiles::current->settings.theme.hilite_text); | ||
|
||
this->windows[0]->print_multiline(" Move Left\n" | ||
" Move Right\n" | ||
" Soft Drop\n" | ||
" Hard Drop\n" | ||
" Hold Piece\n" | ||
" Rotate Clockwise\n" | ||
" Rotate Counterclockwise\n" | ||
" Show Help\n" | ||
" Pause\n" | ||
" Quit Anytime\n", | ||
11, 4, | ||
Globals::Profiles::current->settings.theme.hilite_text); | ||
|
||
this->windows[0]->print_multiline(InputManager::keyToString(InputManager::getBind("up")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("down")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("left")) + "\n" + | ||
this->windows[0]->print_multiline(InputManager::keyToString(InputManager::getBind("left")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("right")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("down")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("drop")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("hold")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("rotate_clockwise")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("rotate_counterclockwise")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("help")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("pause")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("quit")) + "\n" + | ||
InputManager::keyToString(InputManager::getBind("help")) + "\n", | ||
24, 3, | ||
InputManager::keyToString(InputManager::getBind("quit")) + "\n", | ||
37, 4, | ||
Globals::Profiles::current->settings.theme.text); | ||
|
||
this->windows[0]->print_multiline(" Settings and scores are stored at:\n" | ||
" ~/.local/share/nsnake/", | ||
0, 11, | ||
this->windows[0]->print_multiline("Your settings and scores are stored at:\n", | ||
1, 16, | ||
Globals::Profiles::current->settings.theme.text); | ||
|
||
this->windows[0]->print_multiline("~/.local/share/yetris/" + Globals::Profiles::current->name, | ||
0, 17, | ||
Globals::Profiles::current->settings.theme.hilite_text); | ||
} | ||
// | ||
// Credits | ||
else if (activatedIndex == 1) | ||
{ | ||
this->windows[1]->print_multiline(" _ __ _ __ _ ____ \n" | ||
"| |\\ | ( (` | |\\ | / /\\ | |_/ | |_ \n" | ||
"|_| \\| _)_) |_| \\| /_/--\\ |_| \\ |_|__ \n", | ||
this->windows[1]->print_multiline(" ### ### ####### ####### ###### ####### #####\n" | ||
" ### ### #### ### ### ### ### ### ###\n" | ||
" ##### ###### ### ### ### ### ###\n" | ||
" ### #### ### ###### ### ###\n" | ||
" ### #### ### ### ### ### ### ###\n" | ||
" ### ####### ### ### ### ####### #####\n", | ||
0, 0, Colors::pair(COLOR_BLUE, COLOR_DEFAULT, true)); | ||
|
||
this->windows[1]->print_multiline(" v" VERSION " (built " DATE ")\n", | ||
0, 3, Colors::pair(COLOR_GREEN, COLOR_DEFAULT, true)); | ||
|
||
this->windows[1]->print_multiline( | ||
"\n" | ||
"nSnake was made by Alexandre Dantas,\n" | ||
"contact him at <[email protected]>\n" | ||
"\n" | ||
"Thanks for playing this game :)\n" | ||
"\n" | ||
"http://nsnake.alexdantas.net/\n" | ||
"https://github.com/alexdantas/nsnake/", | ||
1, 5, Globals::Profiles::current->settings.theme.text); | ||
|
||
this->windows[1]->print_multiline(" v" VERSION " (built " DATE ")\n", | ||
24, 6, Colors::pair(COLOR_GREEN, COLOR_DEFAULT, true)); | ||
|
||
this->windows[1]->print_multiline("yetris was created by Alexandre Dantas,\n" | ||
"contact him at <[email protected]>\n" | ||
"\n" | ||
"Thanks for playing this game :)\n" | ||
"\n" | ||
"Homepage: http://nsnake.alexdantas.net/\n" | ||
"\n" | ||
"Source code and other contributors:\n" | ||
"https://github.com/alexdantas/yetris/\n" | ||
"\n" | ||
"Support free software! http://www.gnu.org/", | ||
1, 7, Globals::Profiles::current->settings.theme.text); | ||
} | ||
|
||
this->windows[activatedIndex]->refresh(); | ||
|