Revert "(GLUI) Fix scrolling"
This commit is contained in:
parent
89be56a9ae
commit
ce18d5b099
|
@ -653,7 +653,7 @@ static bool glui_load_image(void *data, menu_image_type_t type)
|
||||||
static float glui_get_scroll(void)
|
static float glui_get_scroll(void)
|
||||||
{
|
{
|
||||||
int half = 0;
|
int half = 0;
|
||||||
unsigned height;
|
unsigned width, height;
|
||||||
glui_handle_t *glui = NULL;
|
glui_handle_t *glui = NULL;
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||||
|
@ -661,7 +661,7 @@ static float glui_get_scroll(void)
|
||||||
if (!menu || !menu->userdata)
|
if (!menu || !menu->userdata)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
video_driver_get_size(NULL, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
glui = (glui_handle_t*)menu->userdata;
|
glui = (glui_handle_t*)menu->userdata;
|
||||||
if (glui->line_height)
|
if (glui->line_height)
|
||||||
|
@ -678,7 +678,7 @@ static void glui_navigation_set(bool scroll)
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
float scroll_pos = 0;
|
float scroll_pos = 0;
|
||||||
|
|
||||||
if (!menu || !disp)
|
if (!menu || !disp || !scroll)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
scroll_pos = glui_get_scroll();
|
scroll_pos = glui_get_scroll();
|
||||||
|
@ -704,11 +704,8 @@ static void glui_navigation_set(bool scroll)
|
||||||
menu_entries_set_start(menu_entries_get_start() - 5);
|
menu_entries_set_start(menu_entries_get_start() - 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scroll)
|
menu_animation_push(disp->animation, 10, scroll_pos,
|
||||||
menu_animation_push(disp->animation, 10, scroll_pos,
|
&menu->scroll_y, EASING_IN_OUT_QUAD, -1, NULL);
|
||||||
&menu->scroll_y, EASING_IN_OUT_QUAD, -1, NULL);
|
|
||||||
else
|
|
||||||
menu->scroll_y = scroll_pos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void glui_navigation_clear(bool pending_push)
|
static void glui_navigation_clear(bool pending_push)
|
||||||
|
@ -738,7 +735,7 @@ static void glui_populate_entries(const char *path,
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glui_navigation_set(false);
|
menu->scroll_y = glui_get_scroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void glui_font(menu_handle_t *menu)
|
static void glui_font(menu_handle_t *menu)
|
||||||
|
|
Loading…
Reference in New Issue