[wip] changed ui_begin_frame() to take explicit canvas size
This commit is contained in:
parent
3769b70753
commit
32d7d91893
4
src/ui.c
4
src/ui.c
|
@ -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
|
||||
|
|
2
src/ui.h
2
src/ui.h
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue