[wip] changed ui_begin_frame() to take explicit canvas size

This commit is contained in:
Martin Fouilleul 2023-04-25 15:10:05 +02:00
parent 3769b70753
commit 32d7d91893
2 changed files with 2 additions and 4 deletions

View File

@ -1395,7 +1395,7 @@ void ui_draw()
// frame begin/end
//-----------------------------------------------------------------------------
void ui_begin_frame(ui_style* defaultStyle, ui_style_mask defaultMask)
void ui_begin_frame(vec2 size, ui_style* defaultStyle, ui_style_mask defaultMask)
{
ui_context* ui = ui_get_context();
@ -1409,8 +1409,6 @@ void ui_begin_frame(ui_style* defaultStyle, ui_style_mask defaultMask)
ui->clipStack = 0;
ui->z = 0;
vec2 size = mg_canvas_size();
defaultMask &= UI_STYLE_COLOR
| UI_STYLE_BG_COLOR
| UI_STYLE_BORDER_COLOR

View File

@ -400,7 +400,7 @@ MP_API ui_context* ui_get_context(void);
MP_API void ui_set_context(ui_context* context);
MP_API void ui_process_event(mp_event* event);
MP_API void ui_begin_frame(ui_style* defaultStyle, ui_style_mask mask);
MP_API void ui_begin_frame(vec2 size, ui_style* defaultStyle, ui_style_mask mask);
MP_API void ui_end_frame(void);
MP_API void ui_draw(void);