DungeonCrawl
|
Exposes helper functions to work with menus. More...
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | NEW_GAME_OPTION "New Game" |
#define | CONTINUE_OPTION "Continue" |
#define | SAVE_GAME_OPTION "Save Game" |
#define | LOAD_GAME_OPTION "Load Game" |
#define | CHANGE_LANGUAGE_OPTION "Change Language" |
#define | EXIT_OPTION "Exit" |
#define | TITLE "DUNGEON CRAWL" |
#define | TITLE_COLOR TB_RED |
#define | MENU_START_Y 5 |
#define | MENU_START_X 10 |
#define | MENU_ITEM_SPACING 2 |
Enumerations | |
enum | menu_result_t { MENU_START_GAME , MENU_CONTINUE , MENU_SAVE_GAME , MENU_LOAD_GAME , MENU_CHANGE_LANGUAGE , MENU_EXIT } |
Functions | |
bool | show_confirmation (const char *message) |
Shows a confirmation dialog with the given message. | |
void | draw_menu (const char **menu_options, int menu_count, int selected_index) |
Draws a menu with the given options. |
Exposes helper functions to work with menus.
Definition in file menu.h.
enum menu_result_t |
void draw_menu | ( | const char ** | menu_options, |
int | menu_count, | ||
int | selected_index ) |
Draws a menu with the given options.
menu_options | Array of menu option strings |
menu_count | Number of menu options |
selected_index | Currently selected menu index |
Definition at line 15 of file menu.c.
bool show_confirmation | ( | const char * | message | ) |
Shows a confirmation dialog with the given message.
message | The message to display |
Definition at line 39 of file menu.c.