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

Declares functions and data for localized save menu UI. More...

Go to the source code of this file.

Enumerations

enum  save_menu_index {
  SAVE_NAME_REQUEST , SAVES_NOT_FOUND , SELECT_SAVE , SAVING ,
  NAVIGATE_INSTRUCTIONS , CONFIRM_QUESTION , WARNING_LOST_PROGRESS , PRESS_ENTER_CONFIRM ,
  PRESS_ANY_RETURN , MAX_SAVE_MENU_STRINGS
}

Functions

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

Variables

char ** save_menu_strings

Detailed Description

Declares functions and data for localized save menu UI.

Definition in file save_menu_local.h.

Enumeration Type Documentation

◆ save_menu_index

enum save_menu_index

Definition at line 8 of file save_menu_local.h.

8 {
9 SAVE_NAME_REQUEST,
10 SAVES_NOT_FOUND,
11 SELECT_SAVE,
12 SAVING,
13 NAVIGATE_INSTRUCTIONS,
14 CONFIRM_QUESTION,
15 WARNING_LOST_PROGRESS,
16
17 PRESS_ENTER_CONFIRM,
18 PRESS_ANY_RETURN,
19
20 MAX_SAVE_MENU_STRINGS
21};

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
extern

Definition at line 11 of file save_menu_local.c.