(GLUI) Add a settings tab

This commit is contained in:
Jean-André Santoni 2015-10-29 17:23:04 +07:00
parent b6bb679e68
commit c0916c11af

View File

@ -50,10 +50,11 @@ enum
enum
{
GLUI_SYSTEM_TAB_MAIN = 0,
GLUI_SYSTEM_TAB_PLAYLISTS
GLUI_SYSTEM_TAB_PLAYLISTS,
GLUI_SYSTEM_TAB_SETTINGS
};
#define GLUI_SYSTEM_TAB_END GLUI_SYSTEM_TAB_PLAYLISTS
#define GLUI_SYSTEM_TAB_END GLUI_SYSTEM_TAB_SETTINGS
struct glui_texture_item
{
@ -720,6 +721,9 @@ static void glui_frame(void)
case GLUI_SYSTEM_TAB_PLAYLISTS:
strlcpy(tab_label, menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB), sizeof(tab_label));
break;
case GLUI_SYSTEM_TAB_SETTINGS:
strlcpy(tab_label, menu_hash_to_str(MENU_VALUE_SETTINGS_TAB), sizeof(tab_label));
break;
}
strlcpy(tab_label, string_to_upper(tab_label), sizeof(tab_label));
@ -1163,6 +1167,12 @@ static void glui_list_cache(menu_list_type_t type, unsigned action)
menu_stack->list[stack_size - 1].type =
MENU_PLAYLISTS_TAB;
break;
case GLUI_SYSTEM_TAB_SETTINGS:
menu_stack->list[stack_size - 1].label =
strdup(menu_hash_to_str(MENU_VALUE_SETTINGS_TAB));
menu_stack->list[stack_size - 1].type =
MENU_SETTINGS;
break;
}
break;
}