made main menu friendlier

This commit is contained in:
2024-07-15 16:29:06 -04:00
parent 5e48265c16
commit 73cdb88458
3 changed files with 27 additions and 10 deletions

View File

@ -36,7 +36,7 @@ const char *NORMAL_SCREEN =
| | \\_ | \\_ _\\ || \\ |\
| \\____/\\____//____/\\_|\\_\\ |\
+-----------------------------------------------------------------------------+\
| Choose your race | |\
| Choose your race: |\
+-----------------------------------------------------------------------------+\
| Shade | |\
+-----------------------------------------------------------------------------+\
@ -51,7 +51,7 @@ const char *NORMAL_SCREEN =
| |\
| |\
| |\
| |\
|-----------------------------------------------------------------------------|\
| |\
+-----------------------------------------------------------------------------+";
@ -63,7 +63,7 @@ const char *EXTRA_SCREEN =
| | \\_ | \\_ _\\ || \\ |\
| \\____/\\____//____/\\_|\\_\\ |\
+-----------------------------------------------------------------------------+\
| Choose your race | |\
| Choose your race: |\
+-----------------------------------------------------------------------------+\
| Shade | |\
+-----------------------------------------------------------------------------+\
@ -78,7 +78,7 @@ const char *EXTRA_SCREEN =
| |\
| |\
| |\
| |\
|-----------------------------------------------------------------------------|\
| |\
+-----------------------------------------------------------------------------+";
@ -152,10 +152,27 @@ int menu::run(input *in) {
return -1;
}
void menu::print(display *out) {
const position MSG_POS = {2, 23};
const char *MSG_NORMAL =
"Move with movement commands, 'yes' to confirm, 'q' to quit.";
const char *MSG_NCURSES =
"Move with movement commands, press 'e' to confirm, 'q' to quit.";
const position SEED_POS = {1, 25};
void menu::print(display *out, const unsigned int seed) {
if (enabled_features & FEATURE_EXTRA_STUFF)
out->print_str({0, 0}, NORMAL_SCREEN);
else
out->print_str({0, 0}, EXTRA_SCREEN);
out->print_str(cur, "->", COLOR_PAIR(COLOR_BLUE));
if (enabled_features & FEATURE_NCURSES)
out->print_str(MSG_POS, MSG_NCURSES, COLOR_PAIR(COLOR_YELLOW));
else
out->print_str(MSG_POS, MSG_NORMAL, COLOR_PAIR(COLOR_YELLOW));
out->print_str(SEED_POS, "Seed: " + std::to_string(seed),
COLOR_PAIR(COLOR_BLUE));
out->print_str(cur, "->", COLOR_PAIR(COLOR_GREEN));
}