DungeonCrawl
Loading...
Searching...
No Matches
save_menu_local.c File Reference

Loads and updates localized strings for the save game menu UI. More...

#include "save_menu_local.h"
#include "../../local/local_handler.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

void update_save_menu_local (void)
 Updates the localized strings for the save menu.

Variables

char ** save_menu_strings = NULL

Detailed Description

Loads and updates localized strings for the save game menu UI.

Definition in file save_menu_local.c.

Function Documentation

◆ update_save_menu_local()

void update_save_menu_local ( void )

Updates the localized strings for the save menu.

This function retrieves the localized strings for the save menu and updates the corresponding entries in the save menu strings array.

Definition at line 13 of file save_menu_local.c.

13 {
14 for (int i = 0; i < MAX_SAVE_MENU_STRINGS; i++) {
15 if (save_menu_strings[i] != NULL) {
16 free(save_menu_strings[i]);
17 }
18 }
19
20 save_menu_strings[SAVE_NAME_REQUEST] = get_local_string("SAVE_MENU.SAVE_NAME.REQUEST");
21 save_menu_strings[SAVES_NOT_FOUND] = get_local_string("SAVE_MENU.SAVES.NOT_FOUND");
22 save_menu_strings[SELECT_SAVE] = get_local_string("SAVE_MENU.SELECT.SAVE");
23 save_menu_strings[SAVING] = get_local_string("SAVE_MENU.SAVING");
24 save_menu_strings[NAVIGATE_INSTRUCTIONS] = get_local_string("SAVE_MENU.NAVIGATE.INSTRUCTIONS");
25 save_menu_strings[CONFIRM_QUESTION] = get_local_string("SAVE_MENU.QUESTION.CONFIRM");
26 save_menu_strings[WARNING_LOST_PROGRESS] = get_local_string("SAVE_MENU.WARNING.PROGRESS.LOST");
27
28 save_menu_strings[PRESS_ENTER_CONFIRM] = get_local_string("PRESS.ENTER.CONFIRM");
29 save_menu_strings[PRESS_ANY_RETURN] = get_local_string("PRESS.ANY.RETURN");
30}
char * get_local_string(const char *key)
Get the localized string for the given key.

Variable Documentation

◆ save_menu_strings

char** save_menu_strings = NULL

Definition at line 11 of file save_menu_local.c.