mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-26 05:24:21 +01:00
Fix select_one
This commit is contained in:
parent
b424598a6b
commit
3f000cb343
24
Src/menu.cpp
24
Src/menu.cpp
@ -538,18 +538,6 @@ static int get_next_seq_y(menu_t *p_menu, int v, int dy)
|
|||||||
return v + dy;
|
return v + dy;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void select_one(menu_t *p_menu, int sel)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (sel >= p_menu->n_entries)
|
|
||||||
sel = 0;
|
|
||||||
p_menu->cur_sel = sel;
|
|
||||||
if (p_menu->pp_msgs[p_menu->cur_sel][0] == ' ' ||
|
|
||||||
p_menu->pp_msgs[p_menu->cur_sel][0] == '#' ||
|
|
||||||
IS_SUBMENU(p_menu->pp_msgs[p_menu->cur_sel]))
|
|
||||||
p_menu->cur_sel = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void select_next(menu_t *p_menu, int dx, int dy)
|
static void select_next(menu_t *p_menu, int dx, int dy)
|
||||||
{
|
{
|
||||||
int next;
|
int next;
|
||||||
@ -574,6 +562,18 @@ static void select_next(menu_t *p_menu, int dx, int dy)
|
|||||||
p_menu->cur_sel = 0;
|
p_menu->cur_sel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void select_one(menu_t *p_menu, int sel)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (sel >= p_menu->n_entries)
|
||||||
|
sel = 0;
|
||||||
|
p_menu->cur_sel = sel;
|
||||||
|
if (p_menu->pp_msgs[p_menu->cur_sel][0] == ' ' ||
|
||||||
|
p_menu->pp_msgs[p_menu->cur_sel][0] == '#' ||
|
||||||
|
IS_SUBMENU(p_menu->pp_msgs[p_menu->cur_sel]))
|
||||||
|
select_next(p_menu, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
static int is_submenu_title(menu_t *p_menu, int n)
|
static int is_submenu_title(menu_t *p_menu, int n)
|
||||||
{
|
{
|
||||||
if (n+1 >= p_menu->n_entries)
|
if (n+1 >= p_menu->n_entries)
|
||||||
|
Loading…
Reference in New Issue
Block a user