Merge pull request #1390 from lakkatv/xmb

(XMB) Display a clock icon
This commit is contained in:
Twinaphex 2015-02-04 22:46:33 +01:00
commit 18b4eb0b4e

View File

@ -70,6 +70,7 @@ enum
XMB_TEXTURE_CURSOR,
XMB_TEXTURE_SWITCH_ON,
XMB_TEXTURE_SWITCH_OFF,
XMB_TEXTURE_CLOCK,
XMB_TEXTURE_LAST
};
@ -1068,10 +1069,15 @@ static void xmb_frame(void)
disp_timedate_set_label(timedate, sizeof(timedate), 0);
if (g_settings.menu.timedate_enable)
{
xmb_draw_text(
timedate, gl->win_width - xmb->title_margin_left,
timedate, gl->win_width - xmb->title_margin_left - xmb->icon_size/4,
xmb->title_margin_top, 1, 1, 1);
xmb_draw_icon(xmb->textures[XMB_TEXTURE_CLOCK].id,
gl->win_width - xmb->icon_size, xmb->icon_size, 1, 0, 1);
}
core_version = g_extern.menu.info.library_version;
if (!core_version)
@ -1084,7 +1090,6 @@ static void xmb_frame(void)
xmb_draw_text(title_msg, xmb->title_margin_left,
gl->win_height - xmb->title_margin_bottom, 1, 1, 0);
xmb_draw_icon(xmb->textures[XMB_TEXTURE_ARROW].id,
xmb->x + xmb->margin_left + xmb->hspacing - xmb->icon_size/2.0 + xmb->icon_size,
xmb->margin_top + xmb->icon_size/2.0 + xmb->vspacing * xmb->active_item_factor,
@ -1404,6 +1409,8 @@ static void xmb_context_reset(void *data)
"on.png", sizeof(xmb->textures[XMB_TEXTURE_SWITCH_ON].path));
fill_pathname_join(xmb->textures[XMB_TEXTURE_SWITCH_OFF].path, iconpath,
"off.png", sizeof(xmb->textures[XMB_TEXTURE_SWITCH_OFF].path));
fill_pathname_join(xmb->textures[XMB_TEXTURE_CLOCK].path, iconpath,
"clock.png", sizeof(xmb->textures[XMB_TEXTURE_CLOCK].path));
for (k = 0; k < XMB_TEXTURE_LAST; k++)
xmb->textures[k].id = xmb_png_texture_load(xmb->textures[k].path);