DungeonCrawl
Loading...
Searching...
No Matches
main_menu_local.c
Go to the documentation of this file.
1
5#include "main_menu_local.h"
6
8
9#include <stdlib.h>
10
11char** main_menu_strings = NULL;
12
14 for (int i = 0; i < MAX_MAIN_MENU_STRINGS; i++) {
15 if (main_menu_strings[i] != NULL) {
16 free(main_menu_strings[i]);
17 }
18 }
19
20 main_menu_strings[NEW_GAME_STR] = get_local_string("MAIN_MENU.NEW_GAME");
21 main_menu_strings[CONTINUE_STR] = get_local_string("MAIN_MENU.CONTINUE");
22 main_menu_strings[SAVE_GAME_STR] = get_local_string("MAIN_MENU.SAVE_GAME");
23 main_menu_strings[LOAD_GAME_STR] = get_local_string("MAIN_MENU.LOAD_GAME");
24 main_menu_strings[CHANGE_LANGUAGE_STR] = get_local_string("MAIN_MENU.CHANGE_LANGUAGE");
25 main_menu_strings[EXIT_STR] = get_local_string("MAIN_MENU.EXIT");
26 main_menu_strings[QUESTION_CONTINUE] = get_local_string("MAIN_MENU.QUESTION.CONTINUE");
27 main_menu_strings[QUESTION_EXIT] = get_local_string("MAIN_MENU.QUESTION.EXIT");
28}
char * get_local_string(const char *key)
Get the localized string for the given key.
Exposes public functions for the localization handler.
void update_main_menu_local(void)
Updates the localized strings for the main menu.
Exposes functionality for the localization of the main menu.