menu_display: don't draw text if alpha is 0

This commit is contained in:
natinusala 2019-02-14 11:05:15 +01:00
parent feb6b19c78
commit bfcc32b7be
2 changed files with 5 additions and 5 deletions

View File

@ -107,9 +107,6 @@ void ozone_draw_text(
uint32_t color,
bool draw_outside)
{
if ((color & 0x000000FF) == 0)
return;
menu_display_draw_text(font, str, x, y,
width, height, color, text_align, 1.0f,
false,

View File

@ -1588,10 +1588,13 @@ void menu_display_draw_text(
{
struct font_params params;
if ((color & 0x000000FF) == 0)
return;
/* Don't draw outside of the screen */
if ( ((x < -64 || x > width + 64)
if (!draw_outside &&
((x < -64 || x > width + 64)
|| (y < -64 || y > height + 64))
&& !draw_outside
)
return;