added flag indication if a window was scaled
This commit is contained in:
parent
dee711144a
commit
ca188423cb
|
@ -5084,9 +5084,10 @@ zr_begin_tiled(struct zr_context *context, struct zr_window *window,
|
|||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
zr_flags
|
||||
zr_end(struct zr_context *layout, struct zr_window *window)
|
||||
{
|
||||
zr_flags ret = 0;
|
||||
const struct zr_input *in;
|
||||
const struct zr_style *config;
|
||||
struct zr_command_buffer *out;
|
||||
|
@ -5099,7 +5100,7 @@ zr_end(struct zr_context *layout, struct zr_window *window)
|
|||
|
||||
ZR_ASSERT(layout);
|
||||
ZR_ASSERT(window);
|
||||
if (!window || !layout) return;
|
||||
if (!window || !layout) return ret;
|
||||
|
||||
config = layout->style;
|
||||
out = layout->buffer;
|
||||
|
@ -5238,6 +5239,7 @@ zr_end(struct zr_context *layout, struct zr_window *window)
|
|||
if (zr_input_is_mouse_down(in, ZR_BUTTON_LEFT) && incursor) {
|
||||
window->bounds.w = MAX(window_size.x, window->bounds.w + in->mouse.delta.x);
|
||||
/* draging in y-direction is only possible if static window */
|
||||
ret = ZR_WINDOW_SCALEABLE;
|
||||
if (!(layout->flags & ZR_WINDOW_DYNAMIC))
|
||||
window->bounds.h = MAX(window_size.y, window->bounds.h + in->mouse.delta.y);
|
||||
}
|
||||
|
@ -5281,6 +5283,7 @@ zr_end(struct zr_context *layout, struct zr_window *window)
|
|||
layout->flags &= ~(zr_flags)ZR_WINDOW_REMOVE_ROM;
|
||||
}
|
||||
window->flags = layout->flags;
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct zr_command_buffer*
|
||||
|
|
|
@ -2892,8 +2892,12 @@ zr_flags zr_begin_tiled(struct zr_context*, struct zr_window*, struct zr_tiled_l
|
|||
- window context to fill up with widgets
|
||||
- ZR_WINDOW_MOVABLE if window was moved
|
||||
*/
|
||||
void zr_end(struct zr_context*, struct zr_window*);
|
||||
/* this function ends the window layout build up process and updates the window */
|
||||
zr_flags zr_end(struct zr_context*, struct zr_window*);
|
||||
/* this function ends the window layout build up process and updates the window
|
||||
and placing the window inside a tiled layout on the screen.
|
||||
Output:
|
||||
- ZR_WINDOW_SCALEABLE if window was scaled
|
||||
*/
|
||||
struct zr_rect zr_space(struct zr_context*);
|
||||
/* this function returns the drawable space inside the window */
|
||||
struct zr_command_buffer* zr_canvas(struct zr_context*);
|
||||
|
|
Loading…
Reference in New Issue