(RGUI) Center the title, and display a BACK button
This commit is contained in:
parent
ed593b5b1d
commit
6b3421b971
|
@ -464,7 +464,8 @@ static void glui_frame(void)
|
|||
runloop->frames.video.count / 100, title, true);
|
||||
glui_blit_line(gl, gl->win_width/2, glui->line_height, title_buf, title_color, TEXT_ALIGN_CENTER);
|
||||
|
||||
glui_blit_line(gl, glui->margin, glui->line_height, "BACK", title_color, TEXT_ALIGN_LEFT);
|
||||
if (file_list_get_size(menu->menu_list->menu_stack) > 1)
|
||||
glui_blit_line(gl, glui->margin, glui->line_height, "BACK", title_color, TEXT_ALIGN_LEFT);
|
||||
|
||||
glui_render_quad(gl, 0,
|
||||
gl->win_height - (menu->header_height - glui->line_height/2 + 4),
|
||||
|
|
|
@ -433,13 +433,20 @@ static void rgui_render(void)
|
|||
|
||||
get_title(label, dir, menu_type, title, sizeof(title));
|
||||
|
||||
menu_animation_ticker_line(title_buf, RGUI_TERM_WIDTH - 3,
|
||||
menu_animation_ticker_line(title_buf, RGUI_TERM_WIDTH - 10,
|
||||
runloop->frames.video.count / RGUI_TERM_START_X, title, true);
|
||||
|
||||
hover_color = HOVER_COLOR(settings);
|
||||
normal_color = NORMAL_COLOR(settings);
|
||||
|
||||
blit_line(menu, RGUI_TERM_START_X + RGUI_TERM_START_X, RGUI_TERM_START_X, title_buf, TITLE_COLOR(settings));
|
||||
if (file_list_get_size(menu->menu_list->menu_stack) > 1)
|
||||
blit_line(menu,
|
||||
RGUI_TERM_START_X, RGUI_TERM_START_X,
|
||||
"BACK", TITLE_COLOR(settings));
|
||||
|
||||
blit_line(menu,
|
||||
RGUI_TERM_START_X + (RGUI_TERM_WIDTH - strlen(title_buf)) * FONT_WIDTH_STRIDE / 2,
|
||||
RGUI_TERM_START_X, title_buf, TITLE_COLOR(settings));
|
||||
|
||||
core_name = global->menu.info.library_name;
|
||||
if (!core_name)
|
||||
|
@ -455,11 +462,10 @@ static void rgui_render(void)
|
|||
if (!core_version)
|
||||
core_version = "";
|
||||
|
||||
|
||||
snprintf(title_msg, sizeof(title_msg), "%s - %s %s", PACKAGE_VERSION,
|
||||
core_name, core_version);
|
||||
blit_line(menu,
|
||||
RGUI_TERM_START_X + RGUI_TERM_START_X,
|
||||
RGUI_TERM_START_X,
|
||||
(RGUI_TERM_HEIGHT * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y + 2, title_msg, hover_color);
|
||||
}
|
||||
|
@ -469,12 +475,11 @@ static void rgui_render(void)
|
|||
disp_timedate_set_label(timedate, sizeof(timedate), 3);
|
||||
|
||||
blit_line(menu,
|
||||
(RGUI_TERM_WIDTH * FONT_HEIGHT_STRIDE) + (60),
|
||||
RGUI_TERM_WIDTH * FONT_WIDTH_STRIDE - RGUI_TERM_START_X,
|
||||
(RGUI_TERM_HEIGHT * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y + 2, timedate, hover_color);
|
||||
}
|
||||
|
||||
|
||||
x = RGUI_TERM_START_X;
|
||||
y = RGUI_TERM_START_Y;
|
||||
|
||||
|
@ -567,7 +572,7 @@ static void *rgui_init(void)
|
|||
|
||||
menu->frame_buf.width = 320;
|
||||
menu->frame_buf.height = 240;
|
||||
menu->header_height = 11;
|
||||
menu->header_height = FONT_HEIGHT_STRIDE * 2;
|
||||
menu->begin = 0;
|
||||
menu->frame_buf.pitch = menu->frame_buf.width * sizeof(uint16_t);
|
||||
|
||||
|
|
Loading…
Reference in New Issue