mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 14:42:27 +00:00
(XMB) Display the favorites tab, part 1
This commit is contained in:
parent
fc2637a696
commit
61cc899867
@ -397,6 +397,8 @@ MSG_HASH(MENU_ENUM_LABEL_FILE_BROWSER_SHADER,
|
||||
"file_browser_shader")
|
||||
MSG_HASH(MENU_ENUM_LABEL_FILE_BROWSER_SHADER_PRESET,
|
||||
"file_browser_shader_preset")
|
||||
MSG_HASH(MENU_ENUM_LABEL_FAVORITES_TAB,
|
||||
"favorites_tab")
|
||||
MSG_HASH(MENU_ENUM_LABEL_FPS_SHOW,
|
||||
"fps_show")
|
||||
MSG_HASH(MENU_ENUM_LABEL_FRAME_THROTTLE_ENABLE,
|
||||
|
@ -615,6 +615,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_FALSE,
|
||||
"False")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO,
|
||||
"Maximum Run Speed")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB,
|
||||
"Favorites")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FPS_SHOW,
|
||||
"Display Framerate")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE,
|
||||
|
@ -247,6 +247,8 @@ static int action_get_title_group_settings(const char *path, const char *label,
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MAIN_MENU), len);
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)))
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB), len);
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES_TAB)))
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB), len);
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)))
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_IMAGES_TAB), len);
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)))
|
||||
|
@ -90,6 +90,7 @@ enum
|
||||
XMB_TEXTURE_MAIN_MENU = 0,
|
||||
XMB_TEXTURE_SETTINGS,
|
||||
XMB_TEXTURE_HISTORY,
|
||||
XMB_TEXTURE_FAVORITES,
|
||||
XMB_TEXTURE_MUSICS,
|
||||
#ifdef HAVE_FFMPEG
|
||||
XMB_TEXTURE_MOVIES,
|
||||
@ -150,6 +151,7 @@ enum
|
||||
XMB_SYSTEM_TAB_MAIN = 0,
|
||||
XMB_SYSTEM_TAB_SETTINGS,
|
||||
XMB_SYSTEM_TAB_HISTORY,
|
||||
XMB_SYSTEM_TAB_FAVORITES,
|
||||
XMB_SYSTEM_TAB_MUSIC,
|
||||
#ifdef HAVE_FFMPEG
|
||||
XMB_SYSTEM_TAB_VIDEO,
|
||||
@ -302,6 +304,7 @@ typedef struct xmb_handle
|
||||
#endif
|
||||
xmb_node_t settings_tab_node;
|
||||
xmb_node_t history_tab_node;
|
||||
xmb_node_t favorites_tab_node;
|
||||
xmb_node_t add_tab_node;
|
||||
xmb_node_t netplay_tab_node;
|
||||
|
||||
@ -1540,6 +1543,8 @@ static xmb_node_t* xmb_get_node(xmb_handle_t *xmb, unsigned i)
|
||||
#endif
|
||||
case XMB_SYSTEM_TAB_HISTORY:
|
||||
return &xmb->history_tab_node;
|
||||
case XMB_SYSTEM_TAB_FAVORITES:
|
||||
return &xmb->favorites_tab_node;
|
||||
#ifdef HAVE_NETWORKING
|
||||
case XMB_SYSTEM_TAB_NETPLAY:
|
||||
return &xmb->netplay_tab_node;
|
||||
@ -3286,6 +3291,8 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_SETTINGS;
|
||||
if (settings->bools.menu_xmb_show_history)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_HISTORY;
|
||||
/* TODO if (settings->bools.menu_xmb_show_favorites)*/
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_FAVORITES;
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
if (settings->bools.menu_xmb_show_images)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_IMAGES;
|
||||
@ -3435,6 +3442,8 @@ static const char *xmb_texture_path(unsigned id)
|
||||
return "settings.png";
|
||||
case XMB_TEXTURE_HISTORY:
|
||||
return "history.png";
|
||||
case XMB_TEXTURE_FAVORITES:
|
||||
return "favorites.png";
|
||||
case XMB_TEXTURE_MUSICS:
|
||||
return "musics.png";
|
||||
#ifdef HAVE_FFMPEG
|
||||
@ -3561,6 +3570,10 @@ static void xmb_context_reset_textures(
|
||||
xmb->history_tab_node.alpha = xmb->categories.active.alpha;
|
||||
xmb->history_tab_node.zoom = xmb->categories.active.zoom;
|
||||
|
||||
xmb->favorites_tab_node.icon = xmb->textures.list[XMB_TEXTURE_FAVORITES];
|
||||
xmb->favorites_tab_node.alpha = xmb->categories.active.alpha;
|
||||
xmb->favorites_tab_node.zoom = xmb->categories.active.zoom;
|
||||
|
||||
xmb->music_tab_node.icon = xmb->textures.list[XMB_TEXTURE_MUSICS];
|
||||
xmb->music_tab_node.alpha = xmb->categories.active.alpha;
|
||||
xmb->music_tab_node.zoom = xmb->categories.active.zoom;
|
||||
@ -3872,6 +3885,12 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
||||
menu_stack->list[stack_size - 1].type =
|
||||
MENU_HISTORY_TAB;
|
||||
break;
|
||||
case XMB_SYSTEM_TAB_FAVORITES:
|
||||
menu_stack->list[stack_size - 1].label =
|
||||
strdup(msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES_TAB));
|
||||
menu_stack->list[stack_size - 1].type =
|
||||
MENU_FAVORITES_TAB;
|
||||
break;
|
||||
#ifdef HAVE_NETWORKING
|
||||
case XMB_SYSTEM_TAB_NETPLAY:
|
||||
menu_stack->list[stack_size - 1].label =
|
||||
|
@ -139,6 +139,7 @@ enum menu_settings_type
|
||||
MENU_SETTINGS,
|
||||
MENU_SETTINGS_TAB,
|
||||
MENU_HISTORY_TAB,
|
||||
MENU_FAVORITES_TAB,
|
||||
MENU_MUSIC_TAB,
|
||||
MENU_VIDEO_TAB,
|
||||
MENU_IMAGES_TAB,
|
||||
|
@ -1197,6 +1197,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(HORIZONTAL_MENU),
|
||||
MENU_LABEL(SETTINGS_TAB),
|
||||
MENU_LABEL(HISTORY_TAB),
|
||||
MENU_LABEL(FAVORITES_TAB),
|
||||
MENU_LABEL(ADD_TAB),
|
||||
MENU_LABEL(NETPLAY_TAB),
|
||||
MENU_LABEL(PLAYLISTS_TAB),
|
||||
|
Loading…
x
Reference in New Issue
Block a user