(RGUI/GLUI) Improved mouse controls - pushing the top/bottom corners

of the menu screen in a list view will scroll up/down. Hover controls
have been taken out. Will work on being able to press settings themselves.
This commit is contained in:
twinaphex 2015-02-27 07:27:58 +01:00
parent f30e82bced
commit cf070fa9f3
3 changed files with 6 additions and 3 deletions

View File

@ -304,6 +304,9 @@ static void glui_frame(void)
glui->term_width = (gl->win_width - glui->margin * 2) / glui->glyph_width;
glui->term_height = (gl->win_height - glui->margin * 2) / glui->line_height - 2;
menu->frame_buf.width = gl->win_width;
menu->frame_buf.height = gl->win_height;
menu->mouse.ptr = (menu->mouse.y - glui->margin) /
glui->line_height - 2 + menu->begin;

View File

@ -1295,6 +1295,9 @@ static void *xmb_init(void)
xmb->item.active.factor = 3.0;
xmb->under_offset.item = 5.0;
menu->frame_buf.width = gl->win_width;
menu->frame_buf.height = gl->win_height;
if (gl->win_width >= 3840)
scale_factor = 2.0;
else if (gl->win_width >= 2560)

View File

@ -162,9 +162,6 @@ static int mouse_post_iterate(menu_file_list_cbs_t *cbs, const char *path,
if (!menu->mouse.enable)
return 0;
if (menu->mouse.ptr <= menu_list_get_size(menu->menu_list)-1)
menu_navigation_set(&menu->navigation, menu->mouse.ptr, false);
if (menu->mouse.left)
{
if (!menu->mouse.oldleft)