From 0d6c5ec4d10d36d445ef5077f7fe60f3c03838a5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 5 Oct 2015 02:06:39 +0200 Subject: [PATCH] (GLUI/RGUI) Take out scrollup/scrolldown functionality for now --- menu/drivers/glui.c | 9 --------- menu/drivers/rgui.c | 11 ----------- menu/menu_input.c | 3 --- 3 files changed, 23 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index d35f05885a..1c6203935d 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -231,15 +231,6 @@ static void glui_draw_cursor(glui_handle_t *glui, if (!gl) return; - menu_input_ctl(MENU_INPUT_CTL_MOUSE_SCROLL_DOWN, &mouse_scrolldown); - menu_input_ctl(MENU_INPUT_CTL_MOUSE_SCROLL_UP, &mouse_scrollup); - - if (mouse_scrolldown) - menu->scroll_y += 10; - - if (mouse_scrollup) - menu->scroll_y -= 10; - new_mouse_ptr = (y - glui->line_height + menu->scroll_y - 16) / glui->line_height; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 6596d988cb..6801f4f911 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -499,19 +499,8 @@ static void rgui_render(void) if (settings->menu.mouse.enable) { unsigned new_mouse_ptr; - bool mouse_scrolldown, mouse_scrollup; int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS); - menu_input_ctl(MENU_INPUT_CTL_MOUSE_SCROLL_DOWN, &mouse_scrolldown); - menu_input_ctl(MENU_INPUT_CTL_MOUSE_SCROLL_UP, &mouse_scrollup); - - if (mouse_scrolldown - && (menu_entries_get_start() < menu_entries_get_end() - RGUI_TERM_HEIGHT(fb_width, fb_height))) - menu_entries_set_start(menu_entries_get_start() + 1); - - if (mouse_scrollup && (menu_entries_get_start() > 0)) - menu_entries_set_start(menu_entries_get_start() - 1); - new_mouse_ptr = mouse_y / 11 - 2 + menu_entries_get_start(); menu_input_ctl(MENU_INPUT_CTL_MOUSE_PTR, &new_mouse_ptr); diff --git a/menu/menu_input.c b/menu/menu_input.c index ea63f21cb6..16b88e9637 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -854,9 +854,6 @@ static int menu_input_mouse(unsigned *action) if (menu_input->mouse.y > (int)fb_height - 5) menu_input->mouse.y = fb_height - 5; - menu_input->mouse.scrollup = (menu_input->mouse.y == 5); - menu_input->mouse.scrolldown = (menu_input->mouse.y == (int)fb_height - 5); - if ( (menu_input->mouse.dx != 0) || (menu_input->mouse.dy !=0) ||