|
TheCOSCGameProject
1.0
|
Implementation of the Valeris game menu system. More...
#include "../lib/toolkit.h"#include "../lib/dependencies.h"#include "../lib/dungeon.h"#include "../lib/menu.h"#include "../lib/valerisgame.h"#include <iomanip>
Functions | |
| void | displayIntro (int delayTime, const std::string &color) |
| Display the game introduction. More... | |
| void | Displayj () |
| Display the Valeris game main menu. More... | |
| void | StartGame (const std::string &color) |
| Start a new game of Valeris. More... | |
| void | LoadSavedGame () |
| Load a saved game. More... | |
| void | DisplayInstructionsText () |
| Display the game instructions. More... | |
| std::string | getColor (int colorChoice, const std::string &color) |
| Get color from user for menu. More... | |
| void | Accessiblity (int &delayTime, std::string &color) |
| Configure accessibility options. More... | |
Implementation of the Valeris game menu system.
This file contains functions for displaying the game menu, handling user input, and configuring accessibility options.
| void Accessiblity | ( | int & | delayTime, |
| std::string & | color | ||
| ) |
Configure accessibility options.
Manages accessibility options.
| delayTime | Reference to the delay time between printing each character. |
| color | Reference to the color code for the text. |
This function allows the player to adjust text speed and color for better accessibility. Changes are applied immediately, and the player can return to the main menu at any time.
| void DisplayInstructionsText | ( | ) |
Display the game instructions.
Displays the game instructions.
This function prints the instructions for playing the Valeris game and waits for the user to press Enter before clearing the screen.
| void displayIntro | ( | int | delayTime, |
| const std::string & | color | ||
| ) |
Display the game introduction.
Displays the introductory text for the game.
| delayTime | The delay time between printing each character. |
| color | The color code for the text. |
The introduction is read from a file and printed with a delay and color for dramatic effect.
| void Displayj | ( | ) |
Display the Valeris game main menu.
Displays the game menu.
This function displays the main menu with options for starting a new game, loading a saved game, viewing instructions, adjusting accessibility settings, or exiting the game.
| std::string getColor | ( | int | colorChoice, |
| const std::string & | color | ||
| ) |
Get color from user for menu.
| colorChoice | the color choice the user chose. |
| color | Reference to the old color code for the text. |
This function allows the player to select and change the color of the text
| void LoadSavedGame | ( | ) |
Load a saved game.
Loads a saved game.
This function simulates loading a saved game. The actual loading functionality is not implemented.
| void StartGame | ( | const std::string & | color | ) |
Start a new game of Valeris.
Starts a new game.
This function creates an instance of the ValerisGame class and begins the game.
1.8.13