Make materialui_render_keyboard and xmb_render_keyboard identical

This commit is contained in:
twinaphex 2018-04-23 11:36:15 +02:00
parent 54ec4e47e8
commit f8ccf50fd4
2 changed files with 19 additions and 13 deletions

View File

@ -438,7 +438,7 @@ static void materialui_render_keyboard(
width, height,
&dark[0]);
ptr_width = width / 11;
ptr_width = width / 11;
ptr_height = height / 10;
if (ptr_width >= ptr_height)
@ -450,21 +450,26 @@ static void materialui_render_keyboard(
uintptr_t texture = mui->textures.list[MUI_TEXTURE_KEY];
if (i == id)
{
texture = mui->textures.list[MUI_TEXTURE_KEY_HOVER];
menu_display_blend_begin(video_info);
menu_display_blend_begin(video_info);
menu_display_draw_texture(
video_info,
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width,
height/2.0 + ptr_height*1.5 + line_y,
ptr_width, ptr_height,
width, height,
&white[0],
texture);
menu_display_draw_texture(
video_info,
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width,
height/2.0 + ptr_height*1.5 + line_y,
ptr_width, ptr_height,
width, height,
&white[0],
texture);
menu_display_blend_end(video_info);
}
menu_display_draw_text(mui->font, grid[i],
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width + ptr_width/2.0,
width/2.0 - (11*ptr_width)/2.0 + (i % 11)
* ptr_width + ptr_width/2.0,
height/2.0 + ptr_height + line_y + mui->font->size / 3,
width, height, 0xffffffff, TEXT_ALIGN_CENTER, 1.0f,
false, 0);

View File

@ -828,7 +828,7 @@ static void xmb_render_keyboard(xmb_handle_t *xmb,
width, height,
&dark[0]);
ptr_width = width / 11;
ptr_width = width / 11;
ptr_height = height / 10;
if (ptr_width >= ptr_height)
@ -857,7 +857,8 @@ static void xmb_render_keyboard(xmb_handle_t *xmb,
}
menu_display_draw_text(xmb->font, grid[i],
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width + ptr_width/2.0,
width/2.0 - (11*ptr_width)/2.0 + (i % 11)
* ptr_width + ptr_width/2.0,
height/2.0 + ptr_height + line_y + xmb->font->size / 3,
width, height, 0xffffffff, TEXT_ALIGN_CENTER, 1.0f,
false, 0);