(GLUI) Cleanup glui_render_menu_list()

This commit is contained in:
Higor Eurípedes 2015-07-15 18:56:24 -03:00
parent 9b019dbc1e
commit 615b8b39f1

View File

@ -331,33 +331,29 @@ static void glui_render_menu_list(glui_handle_t *glui,
{
bool entry_selected;
menu_entry_t entry;
char message[PATH_MAX_LENGTH];
char entry_title_buf[PATH_MAX_LENGTH];
char type_str_buf[PATH_MAX_LENGTH];
char label_str[PATH_MAX_LENGTH];
char value_str[PATH_MAX_LENGTH];
int y = disp->header_height - menu->scroll_y + (glui->line_height * i);
if (y > (int)height || ((y + (int)glui->line_height) < 0))
continue;
message[0] = '\0';
entry_title_buf[0] = '\0';
type_str_buf[0] = '\0';
label_str[0] = '\0';
value_str[0] = '\0';
menu_entries_get(i, &entry);
entry_selected = entries->navigation.selection_ptr == i;
menu_animation_ticker_line(entry_title_buf, glui->ticker_limit,
menu_animation_ticker_line(label_str, glui->ticker_limit,
frame_count / 40, entry.path, entry_selected);
menu_animation_ticker_line(type_str_buf, glui->ticker_limit,
menu_animation_ticker_line(value_str, glui->ticker_limit,
frame_count / 40, entry.value, entry_selected);
strlcpy(message, entry_title_buf, sizeof(message));
glui_blit_line(glui->margin, y, message,
glui_blit_line(glui->margin, y, label_str,
entry_selected ? hover_color : normal_color, TEXT_ALIGN_LEFT);
glui_blit_line(width - glui->margin, y, type_str_buf,
glui_blit_line(width - glui->margin, y, value_str,
entry_selected ? hover_color : normal_color, TEXT_ALIGN_RIGHT);
}
}