(XUI/Menu_common) Set current selection per action
This commit is contained in:
parent
755c07fe35
commit
da3cff4903
|
@ -1077,6 +1077,9 @@ static int menu_iterate_func(void *data, unsigned action)
|
|||
rgui->selection_ptr -= scroll_speed;
|
||||
else
|
||||
rgui->selection_ptr = rgui->selection_buf->size - 1;
|
||||
#ifdef HAVE_RMENU_XUI
|
||||
XuiListSetCurSel(m_menulist, rgui->selection_ptr);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RGUI_ACTION_DOWN:
|
||||
|
@ -1084,6 +1087,9 @@ static int menu_iterate_func(void *data, unsigned action)
|
|||
rgui->selection_ptr += scroll_speed;
|
||||
else
|
||||
rgui->selection_ptr = 0;
|
||||
#ifdef HAVE_RMENU_XUI
|
||||
XuiListSetCurSel(m_menulist, rgui->selection_ptr);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RGUI_ACTION_LEFT:
|
||||
|
@ -1102,9 +1108,15 @@ static int menu_iterate_func(void *data, unsigned action)
|
|||
|
||||
case RGUI_ACTION_SCROLL_UP:
|
||||
menu_descend_alphabet(rgui, &rgui->selection_ptr);
|
||||
#ifdef HAVE_RMENU_XUI
|
||||
XuiListSetCurSel(m_menulist, rgui->selection_ptr);
|
||||
#endif
|
||||
break;
|
||||
case RGUI_ACTION_SCROLL_DOWN:
|
||||
menu_ascend_alphabet(rgui, &rgui->selection_ptr);
|
||||
#ifdef HAVE_RMENU_XUI
|
||||
XuiListSetCurSel(m_menulist, rgui->selection_ptr);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RGUI_ACTION_CANCEL:
|
||||
|
@ -1112,6 +1124,9 @@ static int menu_iterate_func(void *data, unsigned action)
|
|||
{
|
||||
rgui->need_refresh = true;
|
||||
file_list_pop(rgui->menu_stack, &rgui->selection_ptr);
|
||||
#ifdef HAVE_RMENU_XUI
|
||||
XuiListSetCurSel(m_menulist, rgui->selection_ptr);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue