updated ozone to use macros instead of hardcoded values

This commit is contained in:
Patrick Scheurenbrand 2019-02-10 16:22:45 +01:00
parent d319e6a93d
commit 5d9356f2ff
4 changed files with 51 additions and 47 deletions

View File

@ -797,13 +797,13 @@ static void ozone_update_scroll(ozone_handle_t *ozone, bool allow_animation, ozo
video_driver_get_size(NULL, &video_info_height); video_driver_get_size(NULL, &video_info_height);
current_selection_middle_onscreen = ENTRIES_START_Y + ozone->animations.scroll_y + node->position_y + node->height / 2; current_selection_middle_onscreen = ENTRIES_START_Y + ozone->animations.scroll_y + node->position_y + node->height / 2;
bottom_boundary = video_info_height - 87 - 78; bottom_boundary = video_info_height - HEADER_HEIGHT - FOOTER_HEIGHT;
entries_middle = video_info_height/2; entries_middle = video_info_height/2;
new_scroll = ozone->animations.scroll_y - (current_selection_middle_onscreen - entries_middle); new_scroll = ozone->animations.scroll_y - (current_selection_middle_onscreen - entries_middle);
if (new_scroll + ozone->entries_height < bottom_boundary) if (new_scroll + ozone->entries_height < bottom_boundary)
new_scroll = -(78 + ozone->entries_height - bottom_boundary); new_scroll = -(FOOTER_HEIGHT + ozone->entries_height - bottom_boundary);
if (new_scroll > 0) if (new_scroll > 0)
new_scroll = 0; new_scroll = 0;
@ -966,7 +966,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
unsigned timedate_offset = 0; unsigned timedate_offset = 0;
/* Separator */ /* Separator */
menu_display_draw_quad(video_info, 30, 87, video_info->width - 60, 1, video_info->width, video_info->height, ozone->theme->header_footer_separator); menu_display_draw_quad(video_info, 30, HEADER_HEIGHT, video_info->width - 60, 1, video_info->width, video_info->height, ozone->theme->header_footer_separator);
/* Title */ /* Title */
ticker.s = title; ticker.s = title;
@ -977,7 +977,7 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
menu_animation_ticker(&ticker); menu_animation_ticker(&ticker);
ozone_draw_text(video_info, ozone, title, 128, 20 + FONT_SIZE_TITLE, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.title, ozone->theme->text_rgba, false); ozone_draw_text(video_info, ozone, title, 128, HEADER_HEIGHT / 2 + FONT_SIZE_TITLE * 3/8, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.title, ozone->theme->text_rgba, false);
/* Icon */ /* Icon */
menu_display_blend_begin(video_info); menu_display_blend_begin(video_info);
@ -986,11 +986,11 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_DISCORD_OWN_AVATAR], 47, 14, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_DISCORD_OWN_AVATAR], 47, 14, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon);
else else
#endif #endif
ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_RETROARCH], 47, 14, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); ozone_draw_icon(video_info, 60, 60, ozone->textures[OZONE_TEXTURE_RETROARCH], 47, (HEADER_HEIGHT - 60) / 2, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon);
menu_display_blend_end(video_info); menu_display_blend_end(video_info);
/* Battery */ /* Battery */
if (video_info->battery_level_enable) if (video_info->battery_level_enable || true)
{ {
char msg[12]; char msg[12];
static retro_time_t last_time = 0; static retro_time_t last_time = 0;
@ -1016,10 +1016,10 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
snprintf(msg, sizeof(msg), "%d%%", percent); snprintf(msg, sizeof(msg), "%d%%", percent);
ozone_draw_text(video_info, ozone, msg, video_info->width - 85, 30 + FONT_SIZE_TIME, TEXT_ALIGN_RIGHT, video_info->width, video_info->height, ozone->fonts.time, ozone->theme->text_rgba, false); ozone_draw_text(video_info, ozone, msg, video_info->width - 85, HEADER_HEIGHT / 2 + FONT_SIZE_TIME * 3/8, TEXT_ALIGN_RIGHT, video_info->width, video_info->height, ozone->fonts.time, ozone->theme->text_rgba, false);
menu_display_blend_begin(video_info); menu_display_blend_begin(video_info);
ozone_draw_icon(video_info, 92, 92, ozone->icons_textures[charging ? OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_CHARGING : OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_FULL], video_info->width - 60 - 56, 30 - 28, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); ozone_draw_icon(video_info, 92, 92, ozone->icons_textures[charging ? OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_CHARGING : OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_FULL], video_info->width - 60 - 56, HEADER_HEIGHT / 2 - 42, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon);
menu_display_blend_end(video_info); menu_display_blend_end(video_info);
} }
} }
@ -1038,10 +1038,10 @@ static void ozone_draw_header(ozone_handle_t *ozone, video_frame_info_t *video_i
menu_display_timedate(&datetime); menu_display_timedate(&datetime);
ozone_draw_text(video_info, ozone, timedate, video_info->width - 87 - timedate_offset, 30 + FONT_SIZE_TIME, TEXT_ALIGN_RIGHT, video_info->width, video_info->height, ozone->fonts.time, ozone->theme->text_rgba, false); ozone_draw_text(video_info, ozone, timedate, video_info->width - 85 - timedate_offset, HEADER_HEIGHT / 2 + FONT_SIZE_TIME * 3/8, TEXT_ALIGN_RIGHT, video_info->width, video_info->height, ozone->fonts.time, ozone->theme->text_rgba, false);
menu_display_blend_begin(video_info); menu_display_blend_begin(video_info);
ozone_draw_icon(video_info, 92, 92, ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOCK], video_info->width - 60 - 56 - timedate_offset, 30 - 28, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon); ozone_draw_icon(video_info, 92, 92, ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOCK], video_info->width - 60 - 56 - timedate_offset, HEADER_HEIGHT / 2 - 42, video_info->width, video_info->height, 0, 1, ozone->theme->entries_icon);
menu_display_blend_end(video_info); menu_display_blend_end(video_info);
} }
} }
@ -1050,16 +1050,15 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
{ {
char core_title[255]; char core_title[255];
/* Separator */ /* Separator */
menu_display_draw_quad(video_info, 23, video_info->height - 78, video_info->width - 60, 1, video_info->width, video_info->height, ozone->theme->header_footer_separator); menu_display_draw_quad(video_info, 23, video_info->height - FOOTER_HEIGHT, video_info->width - 60, 1, video_info->width, video_info->height, ozone->theme->header_footer_separator);
/* Core title or Switch icon */ /* Core title or Switch icon */
if (settings->bools.menu_core_enable && menu_entries_get_core_title(core_title, sizeof(core_title)) == 0) if (settings->bools.menu_core_enable && menu_entries_get_core_title(core_title, sizeof(core_title)) == 0)
ozone_draw_text(video_info, ozone, core_title, 59, video_info->height - 49 + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false); ozone_draw_text(video_info, ozone, core_title, 59, video_info->height - FOOTER_HEIGHT / 2 + FONT_SIZE_FOOTER * 3/8, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false);
else else
ozone_draw_icon(video_info, 69, 30, ozone->theme->textures[OZONE_THEME_TEXTURE_SWITCH], 59, video_info->height - 52, video_info->width,video_info->height, 0, 1, NULL); ozone_draw_icon(video_info, 69, 30, ozone->theme->textures[OZONE_THEME_TEXTURE_SWITCH], 59, video_info->height - FOOTER_HEIGHT / 2 - 15, video_info->width,video_info->height, 0, 1, NULL);
/* Buttons */ /* Buttons */
{ {
unsigned back_width = 215; unsigned back_width = 215;
unsigned back_height = 49; unsigned back_height = 49;
@ -1079,13 +1078,13 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
if (do_swap) if (do_swap)
{ {
ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 133, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL); ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 133, video_info->height - FOOTER_HEIGHT / 2 - 12, video_info->width,video_info->height, 0, 1, NULL);
ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 251, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL); ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 251, video_info->height - FOOTER_HEIGHT / 2 - 12, video_info->width,video_info->height, 0, 1, NULL);
} }
else else
{ {
ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 251, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL); ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_B], video_info->width - 251, video_info->height - FOOTER_HEIGHT / 2 - 12, video_info->width,video_info->height, 0, 1, NULL);
ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 133, video_info->height - 49, video_info->width,video_info->height, 0, 1, NULL); ozone_draw_icon(video_info, 25, 25, ozone->theme->textures[OZONE_THEME_TEXTURE_BUTTON_A], video_info->width - 133, video_info->height - FOOTER_HEIGHT / 2 - 12, video_info->width,video_info->height, 0, 1, NULL);
} }
menu_display_blend_end(video_info); menu_display_blend_end(video_info);
@ -1094,12 +1093,12 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
do_swap ? do_swap ?
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK) : msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK) :
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK),
video_info->width - back_width, video_info->height - back_height + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false); video_info->width - back_width, video_info->height - FOOTER_HEIGHT / 2 + FONT_SIZE_FOOTER * 3/8, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false);
ozone_draw_text(video_info, ozone, ozone_draw_text(video_info, ozone,
do_swap ? do_swap ?
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK) : msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK) :
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK),
video_info->width - ok_width, video_info->height - ok_height + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false); video_info->width - ok_width, video_info->height - FOOTER_HEIGHT / 2 + FONT_SIZE_FOOTER * 3/8, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false);
} }
menu_display_blend_end(video_info); menu_display_blend_end(video_info);
@ -1249,7 +1248,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
ozone_draw_sidebar(ozone, video_info); ozone_draw_sidebar(ozone, video_info);
/* Menu entries */ /* Menu entries */
menu_display_scissor_begin(video_info, ozone->sidebar_offset + 408, 87, video_info->width - 408 + (-ozone->sidebar_offset), video_info->height - 87 - 78); menu_display_scissor_begin(video_info, ozone->sidebar_offset + SIDEBAR_WIDTH, HEADER_HEIGHT, video_info->width - SIDEBAR_WIDTH + (-ozone->sidebar_offset), video_info->height - HEADER_HEIGHT - FOOTER_HEIGHT);
/* Current list */ /* Current list */
ozone_draw_entries(ozone, ozone_draw_entries(ozone,
@ -1415,7 +1414,7 @@ static void ozone_list_open(ozone_handle_t *ozone)
entry.easing_enum = EASING_OUT_QUAD; entry.easing_enum = EASING_OUT_QUAD;
entry.subject = &ozone->sidebar_offset; entry.subject = &ozone->sidebar_offset;
entry.tag = (uintptr_t) NULL; entry.tag = (uintptr_t) NULL;
entry.target_value = -408.0f; entry.target_value = -SIDEBAR_WIDTH;
entry.userdata = (void*) ozone; entry.userdata = (void*) ozone;
menu_animation_push(&entry); menu_animation_push(&entry);
@ -1741,7 +1740,7 @@ static void ozone_list_cache(void *data,
y = ENTRIES_START_Y; y = ENTRIES_START_Y;
entries_end = menu_entries_get_size(); entries_end = menu_entries_get_size();
selection_buf = menu_entries_get_selection_buf_ptr(0); selection_buf = menu_entries_get_selection_buf_ptr(0);
bottom_boundary = video_info_height - 87 - 78; bottom_boundary = video_info_height - HEADER_HEIGHT - FOOTER_HEIGHT;
for (i = 0; i < entries_end; i++) for (i = 0; i < entries_end; i++)
{ {

View File

@ -37,7 +37,12 @@ typedef struct ozone_handle ozone_handle_t;
#define ANIMATION_CURSOR_DURATION 8 #define ANIMATION_CURSOR_DURATION 8
#define ANIMATION_CURSOR_PULSE 30 #define ANIMATION_CURSOR_PULSE 30
#define ENTRIES_START_Y 127 #define HEADER_HEIGHT 87
#define FOOTER_HEIGHT 78
#define SIDEBAR_WIDTH 408
#define ENTRIE_PADDING 67
#define ENTRIES_START_Y (HEADER_HEIGHT + 40)
#define INTERVAL_BATTERY_LEVEL_CHECK (30 * 1000000) #define INTERVAL_BATTERY_LEVEL_CHECK (30 * 1000000)
#define INTERVAL_OSK_CURSOR (0.5f * 1000000) #define INTERVAL_OSK_CURSOR (0.5f * 1000000)

View File

@ -113,7 +113,7 @@ void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
size_t i, y, entries_end; size_t i, y, entries_end;
float sidebar_offset, bottom_boundary, invert, alpha_anim; float sidebar_offset, bottom_boundary, invert, alpha_anim;
unsigned video_info_height, video_info_width, entry_width, button_height; unsigned video_info_height, video_info_width, entry_width, button_height;
int x_offset = 22; int x_offset = 0;
size_t selection_y = 0; size_t selection_y = 0;
size_t old_selection_y = 0; size_t old_selection_y = 0;
@ -122,13 +122,13 @@ void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
entries_end = file_list_get_size(selection_buf); entries_end = file_list_get_size(selection_buf);
old_list = selection_buf == ozone->selection_buf_old; old_list = selection_buf == ozone->selection_buf_old;
y = ENTRIES_START_Y; y = ENTRIES_START_Y;
sidebar_offset = ozone->sidebar_offset / 2.0f; sidebar_offset = ozone->sidebar_offset;
entry_width = video_info->width - 548; entry_width = video_info->width - SIDEBAR_WIDTH - ozone->sidebar_offset - ENTRIE_PADDING * 2;
button_height = 52; /* height of the button (entry minus sublabel) */ button_height = 52; /* height of the button (entry minus sublabel) */
video_driver_get_size(&video_info_width, &video_info_height); video_driver_get_size(&video_info_width, &video_info_height);
bottom_boundary = video_info_height - 87 - 78; bottom_boundary = video_info_height - HEADER_HEIGHT - FOOTER_HEIGHT;
invert = (ozone->fade_direction) ? -1 : 1; invert = (ozone->fade_direction) ? -1 : 1;
alpha_anim = old_list ? alpha : 1.0f - alpha; alpha_anim = old_list ? alpha : 1.0f - alpha;
@ -172,8 +172,8 @@ void ozone_draw_entries(ozone_handle_t *ozone, video_frame_info_t *video_info,
ozone_color_alpha(ozone->theme_dynamic.entries_checkmark, alpha); ozone_color_alpha(ozone->theme_dynamic.entries_checkmark, alpha);
/* Borders */ /* Borders */
menu_display_draw_quad(video_info, x_offset + 456-3, y - 3 + scroll_y, entry_width + 10 - 3 -1, 1, video_info->width, video_info->height, ozone->theme_dynamic.entries_border); menu_display_draw_quad(video_info, SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING - 3, y - 3 + scroll_y, entry_width + 10-3-1, 1, video_info->width, video_info->height, ozone->theme_dynamic.entries_border);
menu_display_draw_quad(video_info, x_offset + 456-3, y - 3 + button_height + scroll_y, entry_width + 10 - 3-1, 1, video_info->width, video_info->height, ozone->theme_dynamic.entries_border); menu_display_draw_quad(video_info, SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING - 3, y - 3 + button_height + scroll_y, entry_width + 10-3-1, 1, video_info->width, video_info->height, ozone->theme_dynamic.entries_border);
border_iterate: border_iterate:
y += node->height; y += node->height;
@ -181,11 +181,11 @@ border_iterate:
/* Cursor(s) layer - current */ /* Cursor(s) layer - current */
if (!ozone->cursor_in_sidebar) if (!ozone->cursor_in_sidebar)
ozone_draw_cursor(ozone, video_info, x_offset + 456, entry_width, button_height, selection_y + scroll_y, ozone->animations.cursor_alpha * alpha); ozone_draw_cursor(ozone, video_info, SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING, entry_width, button_height, selection_y + scroll_y, ozone->animations.cursor_alpha * alpha);
/* Old*/ /* Old*/
if (!ozone->cursor_in_sidebar_old) if (!ozone->cursor_in_sidebar_old)
ozone_draw_cursor(ozone, video_info, x_offset + 456, entry_width, button_height, old_selection_y + scroll_y, (1-ozone->animations.cursor_alpha) * alpha); ozone_draw_cursor(ozone, video_info, SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING, entry_width, button_height, old_selection_y + scroll_y, (1-ozone->animations.cursor_alpha) * alpha);
/* Icons + text */ /* Icons + text */
y = ENTRIES_START_Y; y = ENTRIES_START_Y;
@ -238,7 +238,7 @@ border_iterate:
if (ozone->empty_playlist) if (ozone->empty_playlist)
{ {
unsigned text_width = font_driver_get_message_width(ozone->fonts.entries_label, rich_label, (unsigned)strlen(rich_label), 1); unsigned text_width = font_driver_get_message_width(ozone->fonts.entries_label, rich_label, (unsigned)strlen(rich_label), 1);
x_offset = (video_info_width - 408 - 162)/2 - text_width/2; x_offset = (video_info_width - SIDEBAR_WIDTH - ENTRIE_PADDING * 2) / 2 - text_width / 2 - 60;
y = video_info_height / 2 - 60; y = video_info_height / 2 - 60;
} }
@ -280,7 +280,7 @@ border_iterate:
ozone_color_alpha(icon_color, alpha); ozone_color_alpha(icon_color, alpha);
menu_display_blend_begin(video_info); menu_display_blend_begin(video_info);
ozone_draw_icon(video_info, 46, 46, texture, x_offset + 451+5+10, y + scroll_y, video_info->width, video_info->height, 0, 1, icon_color); ozone_draw_icon(video_info, 46, 46, texture, SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING + 10, y + scroll_y, video_info->width, video_info->height, 0, 1, icon_color);
menu_display_blend_end(video_info); menu_display_blend_end(video_info);
if (icon_color == ozone_pure_white) if (icon_color == ozone_pure_white)
@ -290,9 +290,9 @@ border_iterate:
} }
/* Draw text */ /* Draw text */
ozone_draw_text(video_info, ozone, rich_label, text_offset + x_offset + 521, y + FONT_SIZE_ENTRIES_LABEL + 8 - 1 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_label, COLOR_TEXT_ALPHA(ozone->theme->text_rgba, alpha_uint32), false); ozone_draw_text(video_info, ozone, rich_label, text_offset + SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING + 60, y + FONT_SIZE_ENTRIES_LABEL + 8 - 1 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_label, COLOR_TEXT_ALPHA(ozone->theme->text_rgba, alpha_uint32), false);
if (sublabel_str) if (sublabel_str)
ozone_draw_text(video_info, ozone, sublabel_str, x_offset + 470, y + FONT_SIZE_ENTRIES_SUBLABEL + 80 - 20 - 3 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_sublabel, COLOR_TEXT_ALPHA(ozone->theme->text_sublabel_rgba, alpha_uint32), false); ozone_draw_text(video_info, ozone, sublabel_str, SIDEBAR_WIDTH + x_offset + ENTRIE_PADDING + 10, y + FONT_SIZE_ENTRIES_SUBLABEL + 80 - 20 - 3 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_sublabel, COLOR_TEXT_ALPHA(ozone->theme->text_sublabel_rgba, alpha_uint32), false);
/* Value */ /* Value */
ticker.idx = ozone->frame_count / 20; ticker.idx = ozone->frame_count / 20;
@ -303,7 +303,7 @@ border_iterate:
menu_animation_ticker(&ticker); menu_animation_ticker(&ticker);
ozone_draw_entry_value(ozone, video_info, entry_value_ticker, x_offset + 426 + entry_width, y + FONT_SIZE_ENTRIES_LABEL + 8 - 1 + scroll_y,alpha_uint32, &entry); ozone_draw_entry_value(ozone, video_info, entry_value_ticker, SIDEBAR_WIDTH + ENTRIE_PADDING + x_offset + entry_width - 20, y + FONT_SIZE_ENTRIES_LABEL + 8 - 1 + scroll_y,alpha_uint32, &entry);
free(entry_rich_label); free(entry_rich_label);

View File

@ -121,16 +121,16 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
if (ozone->horizontal_list) if (ozone->horizontal_list)
horizontal_list_size = ozone->horizontal_list->size; horizontal_list_size = ozone->horizontal_list->size;
menu_display_scissor_begin(video_info, 0, 87, 408, video_info->height - 87 - 78); menu_display_scissor_begin(video_info, 0, HEADER_HEIGHT, SIDEBAR_WIDTH, video_info->height - HEADER_HEIGHT - FOOTER_HEIGHT);
/* Background */ /* Background */
sidebar_height = video_info->height - 87 - 55 - 78; sidebar_height = video_info->height - HEADER_HEIGHT - 55 - FOOTER_HEIGHT;
if (!video_info->libretro_running) if (!video_info->libretro_running)
{ {
menu_display_draw_quad(video_info, ozone->sidebar_offset, 88, 408, 55/2, video_info->width, video_info->height, ozone->theme->sidebar_top_gradient); menu_display_draw_quad(video_info, ozone->sidebar_offset, HEADER_HEIGHT + 1, SIDEBAR_WIDTH, 55/2, video_info->width, video_info->height, ozone->theme->sidebar_top_gradient);
menu_display_draw_quad(video_info, ozone->sidebar_offset, 88 + 55/2, 408, sidebar_height, video_info->width, video_info->height, ozone->theme->sidebar_background); menu_display_draw_quad(video_info, ozone->sidebar_offset, HEADER_HEIGHT + 1 + 55/2, SIDEBAR_WIDTH, sidebar_height, video_info->width, video_info->height, ozone->theme->sidebar_background);
menu_display_draw_quad(video_info, ozone->sidebar_offset, 55*2 + sidebar_height, 408, 55/2 + 1, video_info->width, video_info->height, ozone->theme->sidebar_bottom_gradient); menu_display_draw_quad(video_info, ozone->sidebar_offset, video_info->height - FOOTER_HEIGHT - 55/2 - 1, SIDEBAR_WIDTH, 55/2 + 1, video_info->width, video_info->height, ozone->theme->sidebar_bottom_gradient);
} }
/* Tabs */ /* Tabs */
@ -157,10 +157,10 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
/* Cursor */ /* Cursor */
if (ozone->cursor_in_sidebar) if (ozone->cursor_in_sidebar)
ozone_draw_cursor(ozone, video_info, ozone->sidebar_offset + 41, 408 - 81, 52, selection_y-8 + ozone->animations.scroll_y_sidebar, ozone->animations.cursor_alpha); ozone_draw_cursor(ozone, video_info, ozone->sidebar_offset + 41, SIDEBAR_WIDTH - 81, 52, selection_y-8 + ozone->animations.scroll_y_sidebar, ozone->animations.cursor_alpha);
if (ozone->cursor_in_sidebar_old) if (ozone->cursor_in_sidebar_old)
ozone_draw_cursor(ozone, video_info, ozone->sidebar_offset + 41, 408 - 81, 52, selection_old_y-8 + ozone->animations.scroll_y_sidebar, 1-ozone->animations.cursor_alpha); ozone_draw_cursor(ozone, video_info, ozone->sidebar_offset + 41, SIDEBAR_WIDTH - 81, 52, selection_old_y-8 + ozone->animations.scroll_y_sidebar, 1-ozone->animations.cursor_alpha);
/* Menu tabs */ /* Menu tabs */
y = ENTRIES_START_Y - 10; y = ENTRIES_START_Y - 10;
@ -190,7 +190,7 @@ void ozone_draw_sidebar(ozone_handle_t *ozone, video_frame_info_t *video_info)
/* Console tabs */ /* Console tabs */
if (horizontal_list_size > 0) if (horizontal_list_size > 0)
{ {
menu_display_draw_quad(video_info, ozone->sidebar_offset + 41 + 10, y - 5 + ozone->animations.scroll_y_sidebar, 408-81, 1, video_info->width, video_info->height, ozone->theme->entries_border); menu_display_draw_quad(video_info, ozone->sidebar_offset + 41 + 10, y - 5 + ozone->animations.scroll_y_sidebar, SIDEBAR_WIDTH - 81, 1, video_info->width, video_info->height, ozone->theme->entries_border);
y += 30; y += 30;
@ -336,7 +336,7 @@ void ozone_sidebar_goto(ozone_handle_t *ozone, unsigned new_selection)
new_scroll = 0; new_scroll = 0;
selected_position_y = ozone_get_selected_sidebar_y_position(ozone); selected_position_y = ozone_get_selected_sidebar_y_position(ozone);
current_selection_middle_onscreen = ENTRIES_START_Y - 10 + ozone->animations.scroll_y_sidebar + selected_position_y + 65 / 2; current_selection_middle_onscreen = ENTRIES_START_Y - 10 + ozone->animations.scroll_y_sidebar + selected_position_y + 65 / 2;
bottom_boundary = video_info_height - 87 - 78; bottom_boundary = video_info_height - HEADER_HEIGHT - FOOTER_HEIGHT;
entries_middle = video_info_height/2; entries_middle = video_info_height/2;
entries_height = ozone_get_sidebar_height(ozone); entries_height = ozone_get_sidebar_height(ozone);