This commit is contained in:
twinaphex 2017-09-09 04:31:56 +02:00
parent 06a33aada8
commit 1b168bc95e
2 changed files with 16 additions and 20 deletions

View File

@ -60,14 +60,14 @@
/* This struct holds the y position and the line height for each menu entry */
typedef struct
{
float line_height;
float y;
bool texture_switch_set;
uintptr_t texture_switch;
bool texture_switch2_set;
uintptr_t texture_switch2;
bool switch_is_on;
bool do_draw_text;
bool texture_switch_set;
bool texture_switch2_set;
uintptr_t texture_switch;
uintptr_t texture_switch2;
float line_height;
float y;
} mui_node_t;
/* Textures used for the tabs and the switches */
@ -141,6 +141,9 @@ enum
typedef struct mui_handle
{
char box_message[1024];
bool need_compute;
bool mouse_show;
unsigned tabs_height;
unsigned line_height;
unsigned shadow_height;
@ -149,8 +152,9 @@ typedef struct mui_handle
unsigned margin;
unsigned glyph_width;
unsigned glyph_width2;
char box_message[1024];
bool mouse_show;
/* Y position of the vertical scroll */
float scroll_y;
float content_height;
uint64_t frame_count;
struct
@ -188,11 +192,6 @@ typedef struct mui_handle
video_font_raster_block_t raster_block;
video_font_raster_block_t raster_block2;
/* Y position of the vertical scroll */
float scroll_y;
bool need_compute;
float content_height;
} mui_handle_t;
static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)

View File

@ -54,12 +54,12 @@
typedef struct
{
bool force_redraw;
bool mouse_show;
char msgbox[4096];
unsigned last_width;
unsigned last_height;
unsigned frame_count;
float scroll_y;
bool mouse_show;
unsigned int frame_count;
} rgui_t;
static uint16_t *rgui_framebuf_data = NULL;
@ -410,10 +410,7 @@ static void rgui_render(void *data, bool is_idle)
&& menu_driver_is_alive() && !msg_force)
return;
if (is_idle)
return;
if (!menu_display_get_update_pending())
if (is_idle || !menu_display_get_update_pending())
return;
}
@ -634,7 +631,7 @@ static void rgui_render(void *data, bool is_idle)
if (!string_is_empty(rgui->msgbox))
{
rgui_render_messagebox(rgui->msgbox);
rgui->msgbox[0] = '\0';
rgui->msgbox[0] = '\0';
rgui->force_redraw = true;
}