Consistent left-right scrolling for Quick Menu items (#14631)

This commit is contained in:
sonninnos 2022-11-16 11:37:26 +02:00 committed by GitHub
parent b080b39d2b
commit 706d79f535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 36 deletions

View File

@ -1088,18 +1088,6 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_LEFT(cbs, action_left_scroll);
}
break;
case MENU_ENUM_LABEL_START_VIDEO_PROCESSOR:
case MENU_ENUM_LABEL_TAKE_SCREENSHOT:
if (
string_ends_with_size(menu_label, "_tab",
strlen(menu_label),
STRLEN_CONST("_tab"))
|| string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU))
)
{
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
break;
}
case MENU_ENUM_LABEL_VIDEO_GPU_INDEX:
BIND_ACTION_LEFT(cbs, action_left_video_gpu_index);
break;
@ -1246,8 +1234,6 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
case FILE_TYPE_VIDEO_FONT:
case MENU_SETTING_GROUP:
case MENU_SETTINGS_CORE_INFO_NONE:
case MENU_SETTING_ACTION_FAVORITES_DIR:
case MENU_SETTING_ACTION_CORE_MANAGER_OPTIONS:
if (
string_ends_with_size(menu_label, "_tab",
strlen(menu_label), STRLEN_CONST("_tab"))
@ -1257,6 +1243,17 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
break;
}
case MENU_SETTING_ACTION_RUN:
case MENU_SETTING_ACTION_CLOSE:
case MENU_SETTING_ACTION_CLOSE_HORIZONTAL:
case MENU_SETTING_ACTION_DELETE_ENTRY:
case MENU_SETTING_ACTION_CORE_OPTIONS:
case MENU_SETTING_ACTION_CORE_DISK_OPTIONS:
case MENU_SETTING_ACTION_SCREENSHOT:
case MENU_SETTING_ACTION_FAVORITES_DIR:
case MENU_SETTING_ACTION_CORE_MANAGER_OPTIONS:
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION:
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION_KBD:
BIND_ACTION_LEFT(cbs, action_left_scroll);
break;
case MENU_SETTING_ACTION:
@ -1273,10 +1270,6 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
case MENU_SETTING_ACTION_LOADSTATE:
BIND_ACTION_LEFT(cbs, action_left_state_slot);
break;
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION:
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION_KBD:
BIND_ACTION_LEFT(cbs, action_left_scroll);
break;
default:
return -1;
}

View File

@ -1062,8 +1062,6 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
case FILE_TYPE_VIDEO_FONT:
case MENU_SETTING_GROUP:
case MENU_SETTINGS_CORE_INFO_NONE:
case MENU_SETTING_ACTION_FAVORITES_DIR:
case MENU_SETTING_ACTION_CORE_MANAGER_OPTIONS:
if (
string_ends_with_size(menu_label, "_tab",
strlen(menu_label), STRLEN_CONST("_tab"))
@ -1073,6 +1071,17 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
BIND_ACTION_RIGHT(cbs, action_right_mainmenu);
break;
}
case MENU_SETTING_ACTION_RUN:
case MENU_SETTING_ACTION_CLOSE:
case MENU_SETTING_ACTION_CLOSE_HORIZONTAL:
case MENU_SETTING_ACTION_DELETE_ENTRY:
case MENU_SETTING_ACTION_CORE_OPTIONS:
case MENU_SETTING_ACTION_CORE_DISK_OPTIONS:
case MENU_SETTING_ACTION_SCREENSHOT:
case MENU_SETTING_ACTION_FAVORITES_DIR:
case MENU_SETTING_ACTION_CORE_MANAGER_OPTIONS:
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION:
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION_KBD:
BIND_ACTION_RIGHT(cbs, action_right_scroll);
break;
case MENU_SETTING_ACTION:
@ -1089,10 +1098,6 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
case MENU_SETTING_ACTION_LOADSTATE:
BIND_ACTION_RIGHT(cbs, action_right_state_slot);
break;
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION:
case MENU_SETTING_DROPDOWN_ITEM_INPUT_DESCRIPTION_KBD:
BIND_ACTION_RIGHT(cbs, action_right_scroll);
break;
default:
return -1;
}
@ -1214,18 +1219,6 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_RIGHT(cbs, action_right_scroll);
}
break;
case MENU_ENUM_LABEL_START_VIDEO_PROCESSOR:
case MENU_ENUM_LABEL_TAKE_SCREENSHOT:
if (
string_ends_with_size(menu_label, "_tab",
strlen(menu_label),
STRLEN_CONST("_tab"))
|| string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU))
)
{
BIND_ACTION_RIGHT(cbs, action_right_mainmenu);
break;
}
case MENU_ENUM_LABEL_VIDEO_GPU_INDEX:
BIND_ACTION_RIGHT(cbs, action_right_video_gpu_index);
break;