(GLUI) Move tabs to the bottom

This commit is contained in:
Jean-André Santoni 2015-10-29 17:31:13 +07:00
parent c0916c11af
commit 07ef7f23ab
1 changed files with 8 additions and 8 deletions

View File

@ -269,7 +269,7 @@ static void glui_draw_scrollbar(gl_t *gl, unsigned width, unsigned height, GRflo
glui_render_quad(gl, glui_render_quad(gl,
width - scrollbar_width - (header_height / 12), width - scrollbar_width - (header_height / 12),
header_height + glui->tabs_height + y + (header_height / 12), header_height + y + (header_height / 12),
scrollbar_width, scrollbar_width,
scrollbar_height, scrollbar_height,
width, height, width, height,
@ -535,7 +535,7 @@ static void glui_render_menu_list(glui_handle_t *glui, gl_t *gl,
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection)) if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
continue; continue;
y = header_height + glui->tabs_height - menu->scroll_y + (glui->line_height * i); y = header_height - menu->scroll_y + (glui->line_height * i);
if (y > (int)height || ((y + (int)glui->line_height) < 0)) if (y > (int)height || ((y + (int)glui->line_height) < 0))
continue; continue;
@ -681,7 +681,7 @@ static void glui_frame(void)
/* highlighted entry */ /* highlighted entry */
glui_render_quad(gl, 0, glui_render_quad(gl, 0,
header_height + glui->tabs_height - menu->scroll_y + glui->line_height * header_height - menu->scroll_y + glui->line_height *
selection, width, glui->line_height, selection, width, glui->line_height,
width, height, width, height,
&lightblue_bg[0]); &lightblue_bg[0]);
@ -700,8 +700,8 @@ static void glui_frame(void)
width, height, width, height,
&blue_bg[0]); &blue_bg[0]);
/* shadow underneath header */ /* tabs background */
glui_render_quad(gl, 0, header_height, width, glui_render_quad(gl, 0, height - glui->tabs_height, width,
glui->tabs_height, glui->tabs_height,
width, height, width, height,
&blue_bg[0]); &blue_bg[0]);
@ -728,19 +728,19 @@ static void glui_frame(void)
strlcpy(tab_label, string_to_upper(tab_label), sizeof(tab_label)); strlcpy(tab_label, string_to_upper(tab_label), sizeof(tab_label));
glui_blit_line(width / (GLUI_SYSTEM_TAB_END+1) * (i+0.5), glui_blit_line(width / (GLUI_SYSTEM_TAB_END+1) * (i+0.5),
header_height - header_height/8, height - glui->tabs_height - header_height/8,
width, height, tab_label, tab_color, TEXT_ALIGN_CENTER); width, height, tab_label, tab_color, TEXT_ALIGN_CENTER);
} }
tab_width = width / (GLUI_SYSTEM_TAB_END+1); tab_width = width / (GLUI_SYSTEM_TAB_END+1);
glui_render_quad(gl, glui->categories.selection_ptr * tab_width, glui_render_quad(gl, glui->categories.selection_ptr * tab_width,
header_height + glui->tabs_height - (header_height/16), height - (header_height/16),
tab_width, tab_width,
header_height/16, header_height/16,
width, height, width, height,
&pure_white[0]); &pure_white[0]);
glui_render_quad(gl, 0, header_height + glui->tabs_height, width, glui_render_quad(gl, 0, header_height, width,
header_height/12, header_height/12,
width, height, width, height,
&shadow_bg[0]); &shadow_bg[0]);