mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
(RGUI) Add menu sublabel support
This commit is contained in:
parent
17f90a3624
commit
930bb5d71f
@ -321,6 +321,7 @@ static bool menu_show_core_updater = false;
|
||||
#else
|
||||
static bool menu_show_core_updater = true;
|
||||
#endif
|
||||
static bool menu_show_sublabels = false;
|
||||
|
||||
static bool content_show_settings = true;
|
||||
static bool content_show_favorites = true;
|
||||
|
@ -1433,6 +1433,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("menu_timedate_enable", &settings->bools.menu_timedate_enable, true, true, false);
|
||||
SETTING_BOOL("menu_battery_level_enable", &settings->bools.menu_battery_level_enable, true, true, false);
|
||||
SETTING_BOOL("menu_core_enable", &settings->bools.menu_core_enable, true, true, false);
|
||||
SETTING_BOOL("menu_show_sublabels", &settings->bools.menu_show_sublabels, true, menu_show_sublabels, false);
|
||||
SETTING_BOOL("menu_dynamic_wallpaper_enable", &settings->bools.menu_dynamic_wallpaper_enable, true, false, false);
|
||||
SETTING_BOOL("quick_menu_show_recording", &settings->bools.quick_menu_show_recording, true, quick_menu_show_recording, false);
|
||||
SETTING_BOOL("quick_menu_show_streaming", &settings->bools.quick_menu_show_streaming, true, quick_menu_show_streaming, false);
|
||||
|
@ -142,6 +142,7 @@ typedef struct settings
|
||||
bool menu_timedate_enable;
|
||||
bool menu_battery_level_enable;
|
||||
bool menu_core_enable;
|
||||
bool menu_show_sublabels;
|
||||
bool menu_dynamic_wallpaper_enable;
|
||||
bool menu_throttle;
|
||||
bool menu_mouse_enable;
|
||||
|
@ -1443,6 +1443,8 @@ MSG_HASH(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR,
|
||||
"detect_core_list_push_dir")
|
||||
MSG_HASH(MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE,
|
||||
"menu_battery_level_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS,
|
||||
"menu_show_sublabels")
|
||||
MSG_HASH(MENU_ENUM_LABEL_BROWSE_URL,
|
||||
"browse_url")
|
||||
MSG_HASH(MENU_ENUM_LABEL_BROWSE_START,
|
||||
|
@ -1672,6 +1672,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu Linear Filter"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_LINEAR_FILTER,
|
||||
"Adds a slight blur to the menu to take the edge off hard pixel edges."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
"Horizontal Animation"
|
||||
@ -2950,6 +2954,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_THUMBNAIL_DOWNSCALER,
|
||||
"Thumbnail Downscaling Method"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_RGUI_THUMBNAIL_DOWNSCALER,
|
||||
"Resampling method used when shrinking large thumbnails to fit the screen."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_THUMB_SCALE_POINT,
|
||||
"Nearest Neighbour (Fast)"
|
||||
@ -3030,10 +3038,18 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME,
|
||||
"Menu Color Theme"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_RGUI_MENU_COLOR_THEME,
|
||||
"Select a different color theme. Choosing 'Custom' enables the use of menu theme preset files."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_THEME_PRESET,
|
||||
"Custom Menu Theme Preset"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_RGUI_MENU_THEME_PRESET,
|
||||
"Select a menu theme preset from the file browser."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM,
|
||||
"Custom"
|
||||
@ -5015,6 +5031,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_BATTERY_LEVEL_ENABLE,
|
||||
"Show battery level"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS,
|
||||
"Show menu sublabels"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS,
|
||||
"Shows additional information for the currently selected menu entry."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SELECT_FILE,
|
||||
"Select File"
|
||||
@ -6640,18 +6664,34 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE,
|
||||
"Border filler"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_ENABLE,
|
||||
"Display menu border."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE,
|
||||
"Border filler thickness"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE,
|
||||
"Increase coarseness of menu border chequerboard pattern."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE,
|
||||
"Background filler thickness"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE,
|
||||
"Increase coarseness of menu background chequerboard pattern."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_LOCK_ASPECT,
|
||||
"Lock Menu Aspect Ratio"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_RGUI_LOCK_ASPECT,
|
||||
"Ensures that the menu is always displayed with the correct aspect ratio. If disabled, the quick menu will be stretched to match the currently loaded content."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION,
|
||||
"For CRT displays only. Attempts to use exact core/game resolution and refresh rate."
|
||||
|
@ -309,6 +309,7 @@ default_sublabel_macro(action_bind_sublabel_left_thumbnails, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_timedate_enable, MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_timedate_style, MENU_ENUM_SUBLABEL_TIMEDATE_STYLE)
|
||||
default_sublabel_macro(action_bind_sublabel_battery_level_enable, MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_show_sublabels, MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS)
|
||||
default_sublabel_macro(action_bind_sublabel_navigation_wraparound, MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_resampler_quality, MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY)
|
||||
default_sublabel_macro(action_bind_sublabel_netplay_enable_host, MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_HOST)
|
||||
@ -507,6 +508,15 @@ default_sublabel_macro(action_bind_sublabel_switch_gpu_profile, MENU
|
||||
default_sublabel_macro(action_bind_sublabel_switch_backlight_control, MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL)
|
||||
#endif
|
||||
|
||||
default_sublabel_macro(action_bind_sublabel_menu_rgui_border_filler_enable, MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_rgui_border_filler_thickness_enable, MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_rgui_background_filler_thickness_enable, MENU_ENUM_SUBLABEL_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_linear_filter, MENU_ENUM_SUBLABEL_MENU_LINEAR_FILTER)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_rgui_lock_aspect, MENU_ENUM_SUBLABEL_MENU_RGUI_LOCK_ASPECT)
|
||||
default_sublabel_macro(action_bind_sublabel_rgui_menu_color_theme, MENU_ENUM_SUBLABEL_RGUI_MENU_COLOR_THEME)
|
||||
default_sublabel_macro(action_bind_sublabel_rgui_menu_theme_preset, MENU_ENUM_SUBLABEL_RGUI_MENU_THEME_PRESET)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_rgui_thumbnail_downscaler, MENU_ENUM_SUBLABEL_MENU_RGUI_THUMBNAIL_DOWNSCALER)
|
||||
|
||||
static int action_bind_sublabel_systeminfo_controller_entry(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
@ -1445,6 +1455,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_battery_level_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_sublabels);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_TIMEDATE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_timedate_enable);
|
||||
break;
|
||||
@ -2211,6 +2224,30 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_DISCORD_ALLOW:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_discord_allow);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_rgui_border_filler_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_rgui_border_filler_thickness_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_rgui_background_filler_thickness_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_LINEAR_FILTER:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_linear_filter);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_RGUI_LOCK_ASPECT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_rgui_lock_aspect);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_rgui_menu_color_theme);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RGUI_MENU_THEME_PRESET:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_rgui_menu_theme_preset);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_RGUI_THUMBNAIL_DOWNSCALER:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_rgui_thumbnail_downscaler);
|
||||
break;
|
||||
default:
|
||||
case MSG_UNKNOWN:
|
||||
return -1;
|
||||
|
@ -1572,6 +1572,11 @@ static void rgui_render(void *data, bool is_idle)
|
||||
rgui_render_background(rgui);
|
||||
}
|
||||
|
||||
/* We use a single ticker for all text animations.
|
||||
* The same 'idx' is used in all cases, so set it
|
||||
* once at the beginning. */
|
||||
ticker.idx = frame_count / RGUI_TERM_START_X(fb_width);
|
||||
|
||||
/* If thumbnails are enabled and we are viewing a playlist,
|
||||
* switch to thumbnail view mode if either current thumbnail
|
||||
* is valid or we are waiting for current thumbnail to load
|
||||
@ -1581,7 +1586,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
* through a list...) */
|
||||
if (rgui->show_thumbnail && rgui->is_playlist_entry && (thumbnail.is_valid || (rgui->thumbnail_queue_size > 0)))
|
||||
{
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
char thumbnail_title_buf[255];
|
||||
unsigned title_x, title_width;
|
||||
thumbnail_title_buf[0] = '\0';
|
||||
@ -1592,7 +1596,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
/* Format thumbnail title */
|
||||
ticker.s = thumbnail_title_buf;
|
||||
ticker.len = RGUI_TERM_WIDTH(fb_width) - 10;
|
||||
ticker.idx = frame_count / RGUI_TERM_START_X(fb_width);
|
||||
ticker.str = rgui->thumbnail_content;
|
||||
ticker.selected = true;
|
||||
menu_animation_ticker(&ticker);
|
||||
@ -1615,18 +1618,17 @@ static void rgui_render(void *data, bool is_idle)
|
||||
/* No thumbnail - render usual text */
|
||||
char title[255];
|
||||
char title_buf[255];
|
||||
char core_title[64];
|
||||
char core_title_buf[64];
|
||||
/* Need this in two places, so cache here */
|
||||
unsigned timedate_x = RGUI_TERM_WIDTH(fb_width) * FONT_WIDTH_STRIDE - RGUI_TERM_START_X(fb_width);
|
||||
unsigned core_name_len = ((timedate_x - RGUI_TERM_START_X(fb_width)) / FONT_WIDTH_STRIDE) - 3;
|
||||
bool show_core_name = settings->bools.menu_core_enable;
|
||||
|
||||
title[0] = title_buf[0] = core_title[0] = core_title_buf[0] = '\0';
|
||||
/* Print title */
|
||||
title[0] = title_buf[0] = '\0';
|
||||
|
||||
menu_entries_get_title(title, sizeof(title));
|
||||
|
||||
ticker.s = title_buf;
|
||||
ticker.len = RGUI_TERM_WIDTH(fb_width) - 10;
|
||||
ticker.idx = frame_count / RGUI_TERM_START_X(fb_width);;
|
||||
ticker.str = title;
|
||||
ticker.selected = true;
|
||||
|
||||
@ -1641,44 +1643,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||
RGUI_TERM_START_X(fb_width),
|
||||
title_buf, rgui->colors.title_color);
|
||||
|
||||
if (settings->bools.menu_core_enable &&
|
||||
menu_entries_get_core_title(core_title, sizeof(core_title)) == 0)
|
||||
{
|
||||
ticker.s = core_title_buf;
|
||||
ticker.len = ((timedate_x - RGUI_TERM_START_X(fb_width)) / FONT_WIDTH_STRIDE) - 3;
|
||||
ticker.idx = frame_count / RGUI_TERM_START_X(fb_width);
|
||||
ticker.str = core_title;
|
||||
ticker.selected = true;
|
||||
|
||||
menu_animation_ticker(&ticker);
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(
|
||||
RGUI_TERM_START_X(fb_width) + FONT_WIDTH_STRIDE,
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, core_title_buf, rgui->colors.hover_color);
|
||||
}
|
||||
|
||||
if (settings->bools.menu_timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
char timedate[255];
|
||||
|
||||
timedate[0] = '\0';
|
||||
|
||||
datetime.s = timedate;
|
||||
datetime.len = sizeof(timedate);
|
||||
datetime.time_mode = 4;
|
||||
|
||||
menu_display_timedate(&datetime);
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(
|
||||
timedate_x,
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, timedate, rgui->colors.hover_color);
|
||||
}
|
||||
|
||||
/* Print menu entries */
|
||||
x = RGUI_TERM_START_X(fb_width);
|
||||
y = RGUI_TERM_START_Y(fb_height);
|
||||
|
||||
@ -1687,7 +1652,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
for (; i < end; i++, y += FONT_HEIGHT_STRIDE)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
char entry_value[255];
|
||||
char message[255];
|
||||
char entry_title_buf[255];
|
||||
@ -1716,7 +1680,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
|
||||
ticker.s = entry_title_buf;
|
||||
ticker.len = RGUI_TERM_WIDTH(fb_width) - (entry_spacing + 1 + 2);
|
||||
ticker.idx = frame_count / RGUI_TERM_START_X(fb_width);
|
||||
ticker.str = entry_path;
|
||||
ticker.selected = entry_selected;
|
||||
|
||||
@ -1743,9 +1706,86 @@ static void rgui_render(void *data, bool is_idle)
|
||||
blit_line(x, y, message,
|
||||
entry_selected ? rgui->colors.hover_color : rgui->colors.normal_color);
|
||||
|
||||
menu_entry_free(&entry);
|
||||
if (!string_is_empty(entry_path))
|
||||
free(entry_path);
|
||||
|
||||
/* Print menu sublabel (if required) */
|
||||
if (settings->bools.menu_show_sublabels && entry_selected)
|
||||
{
|
||||
if (!string_is_empty(entry.sublabel))
|
||||
{
|
||||
char *sublabel = NULL;
|
||||
char sublabel_buf[255];
|
||||
sublabel_buf[0] = '\0';
|
||||
|
||||
sublabel = menu_entry_get_sublabel(&entry);
|
||||
|
||||
ticker.s = sublabel_buf;
|
||||
ticker.len = core_name_len;
|
||||
ticker.str = sublabel;
|
||||
ticker.selected = true;
|
||||
|
||||
menu_animation_ticker(&ticker);
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(
|
||||
RGUI_TERM_START_X(fb_width) + FONT_WIDTH_STRIDE,
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, sublabel_buf, rgui->colors.hover_color);
|
||||
|
||||
if (!string_is_empty(sublabel))
|
||||
free(sublabel);
|
||||
|
||||
show_core_name = false;
|
||||
}
|
||||
}
|
||||
|
||||
menu_entry_free(&entry);
|
||||
}
|
||||
|
||||
/* Print core name (if required) */
|
||||
if (show_core_name)
|
||||
{
|
||||
char core_title[64];
|
||||
char core_title_buf[64];
|
||||
core_title[0] = core_title_buf[0] = '\0';
|
||||
|
||||
if (menu_entries_get_core_title(core_title, sizeof(core_title)) == 0)
|
||||
{
|
||||
ticker.s = core_title_buf;
|
||||
ticker.len = core_name_len;
|
||||
ticker.str = core_title;
|
||||
ticker.selected = true;
|
||||
|
||||
menu_animation_ticker(&ticker);
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(
|
||||
RGUI_TERM_START_X(fb_width) + FONT_WIDTH_STRIDE,
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, core_title_buf, rgui->colors.hover_color);
|
||||
}
|
||||
}
|
||||
|
||||
/* Print clock (if required) */
|
||||
if (settings->bools.menu_timedate_enable)
|
||||
{
|
||||
menu_display_ctx_datetime_t datetime;
|
||||
char timedate[255];
|
||||
|
||||
timedate[0] = '\0';
|
||||
|
||||
datetime.s = timedate;
|
||||
datetime.len = sizeof(timedate);
|
||||
datetime.time_mode = 4;
|
||||
|
||||
menu_display_timedate(&datetime);
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(
|
||||
timedate_x,
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, timedate, rgui->colors.hover_color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1776,7 +1816,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
if (settings->bools.menu_mouse_enable && cursor_visible)
|
||||
rgui_blit_cursor();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void rgui_framebuffer_free(void)
|
||||
|
@ -3326,6 +3326,7 @@ static int menu_displaylist_parse_options_remappings(
|
||||
unsigned p, retro_id;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS));
|
||||
bool is_rgui = string_is_equal(settings->arrays.menu_driver, "rgui");
|
||||
|
||||
for (p = 0; p < max_users; p++)
|
||||
{
|
||||
@ -3424,9 +3425,9 @@ static int menu_displaylist_parse_options_remappings(
|
||||
strlcpy(descriptor, desc_label, sizeof(descriptor));
|
||||
}
|
||||
|
||||
/* Add user index when display driver == rgui,
|
||||
* but only if there is more than one user */
|
||||
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
|
||||
/* Add user index when display driver == rgui and sublabels
|
||||
* are disabled, but only if there is more than one user */
|
||||
if (is_rgui && (max_users > 1) && !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
snprintf(desc_label, sizeof(desc_label),
|
||||
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
|
||||
@ -3463,9 +3464,9 @@ static int menu_displaylist_parse_options_remappings(
|
||||
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
||||
}
|
||||
|
||||
/* Add user index when display driver == rgui,
|
||||
* but only if there is more than one user */
|
||||
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
|
||||
/* Add user index when display driver == rgui and sublabels
|
||||
* are disabled, but only if there is more than one user */
|
||||
if (is_rgui && (max_users > 1) && !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
snprintf(desc_label, sizeof(desc_label),
|
||||
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
|
||||
@ -5901,6 +5902,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_CORE_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
@ -2719,9 +2719,9 @@ void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_
|
||||
subsystem->desc,
|
||||
star_char);
|
||||
|
||||
/* RGUI does not support sublabels, so have to add the
|
||||
/* If using RGUI with sublabels disabled, add the
|
||||
* appropriate text to the menu entry itself... */
|
||||
if (is_rgui)
|
||||
if (is_rgui && !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
|
||||
@ -2765,9 +2765,9 @@ void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_
|
||||
subsystem->desc,
|
||||
star_char);
|
||||
|
||||
/* RGUI does not support sublabels, so have to add the
|
||||
/* If using RGUI with sublabels disabled, add the
|
||||
* appropriate text to the menu entry itself... */
|
||||
if (is_rgui)
|
||||
if (is_rgui && !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
unsigned j = 0;
|
||||
char rom_buff[PATH_MAX_LENGTH];
|
||||
@ -2811,9 +2811,9 @@ void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_
|
||||
"Load %s",
|
||||
subsystem->desc);
|
||||
|
||||
/* RGUI does not support sublabels, so have to add the
|
||||
/* If using RGUI with sublabels disabled, add the
|
||||
* appropriate text to the menu entry itself... */
|
||||
if (is_rgui)
|
||||
if (is_rgui && !settings->bools.menu_show_sublabels)
|
||||
{
|
||||
/* This check is probably not required (it's not done
|
||||
* in menu_cbs_sublabel.c action_bind_sublabel_subsystem_add(),
|
||||
|
@ -8943,6 +8943,24 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED);
|
||||
|
||||
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_show_sublabels,
|
||||
MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS,
|
||||
true,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
}
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
break;
|
||||
|
@ -893,6 +893,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(TIMEDATE_ENABLE),
|
||||
MENU_LABEL(TIMEDATE_STYLE),
|
||||
MENU_LABEL(BATTERY_LEVEL_ENABLE),
|
||||
MENU_LABEL(MENU_SHOW_SUBLABELS),
|
||||
MENU_LABEL(RGUI_MENU_COLOR_THEME),
|
||||
MENU_LABEL(RGUI_MENU_THEME_PRESET),
|
||||
MENU_LABEL(XMB_MENU_COLOR_THEME),
|
||||
|
Loading…
Reference in New Issue
Block a user