DungeonCrawl
|
Implementation of the main menu. More...
#include "main_menu.h"
#include "../common.h"
#include "../io/input/input_handler.h"
#include "../io/output/common/output_handler.h"
#include "../logging/logger.h"
#include "language_menu.h"
#include "local/main_menu_local.h"
#include "save_menu.h"
#include "src/local/local_handler.h"
Go to the source code of this file.
Functions | |
void | select_menu_option (int selected_index, bool game_in_progress) |
Process a selected menu option. | |
int | init_main_menu () |
Initializes resources for the main menu, including memory allocation and observer registration for localized menu strings. | |
menu_result_t | show_main_menu (const bool game_in_progress) |
Display and handle the main menu. | |
void | shutdown_main_menu (void) |
Shuts down the main menu and frees associated data. |
Variables | |
bool | menu_active |
menu_result_t | active_menu_state |
Implementation of the main menu.
Definition in file main_menu.c.
int init_main_menu | ( | void | ) |
Initializes resources for the main menu, including memory allocation and observer registration for localized menu strings.
Definition at line 28 of file main_menu.c.
void select_menu_option | ( | int | selected_index, |
bool | game_in_progress ) |
Process a selected menu option.
Select a menu option.
selected_index | The selected menu option index |
game_in_progress | Indicates whether there's an active game that can be continued |
selected_index | The index of the menu option that is to be selected. |
game_in_progress | A boolean which shows if the game is in progress or not. |
Definition at line 115 of file main_menu.c.
menu_result_t show_main_menu | ( | bool | game_in_progress | ) |
Display and handle the main menu.
game_in_progress | indicates whether there's an active game that can be continued |
Definition at line 43 of file main_menu.c.
void shutdown_main_menu | ( | void | ) |
Shuts down the main menu and frees associated data.
Definition at line 160 of file main_menu.c.
menu_result_t active_menu_state |
Definition at line 26 of file main_menu.c.
bool menu_active |
Definition at line 25 of file main_menu.c.