(XMB) XMB honors the 'show menu sublabels' setting now - was previously

RGUI only
This commit is contained in:
twinaphex 2019-04-24 01:48:28 +02:00
parent 3e15f1b512
commit c854d0916b
3 changed files with 30 additions and 29 deletions

View File

@ -331,7 +331,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 menu_show_sublabels = true;
static unsigned menu_ticker_type = TICKER_TYPE_BOUNCE;
static float menu_ticker_speed = 1.0f;

View File

@ -2801,21 +2801,25 @@ static int xmb_draw_item(
menu_animation_ticker(&ticker);
label_offset = xmb->margins_label_top;
if (i == current && width > 320 && height > 240
&& !string_is_empty(entry->sublabel))
if (settings->bools.menu_show_sublabels)
{
char entry_sublabel[512] = {0};
if (i == current && width > 320 && height > 240
&& !string_is_empty(entry->sublabel))
{
char entry_sublabel[512] = {0};
label_offset = - xmb->margins_label_top;
label_offset = - xmb->margins_label_top;
word_wrap(entry_sublabel, entry->sublabel, 50 * scale_mod[3], true);
word_wrap(entry_sublabel, entry->sublabel, 50 * scale_mod[3], true);
xmb_draw_text(video_info, xmb, entry_sublabel,
node->x + xmb->margins_screen_left +
xmb->icon_spacing_horizontal + xmb->margins_label_left,
xmb->margins_screen_top + node->y + xmb->margins_label_top*3.5,
1, node->label_alpha, TEXT_ALIGN_LEFT,
width, height, xmb->font2);
xmb_draw_text(video_info, xmb, entry_sublabel,
node->x + xmb->margins_screen_left +
xmb->icon_spacing_horizontal + xmb->margins_label_left,
xmb->margins_screen_top + node->y + xmb->margins_label_top*3.5,
1, node->label_alpha, TEXT_ALIGN_LEFT,
width, height, xmb->font2);
}
}
xmb_draw_text(video_info, xmb, tmp,

View File

@ -9675,23 +9675,20 @@ 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);
}
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_show_sublabels,
MENU_ENUM_LABEL_MENU_SHOW_SUBLABELS,
MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS,
menu_show_sublabels,
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);