fixed non-blocking popup window
This commit is contained in:
parent
4c03c23ab5
commit
26392f7626
38
gui.c
38
gui.c
@ -367,7 +367,6 @@ gui_triangle_from_direction(struct gui_vec2 *result, struct gui_rect r,
|
|||||||
result[2] = gui_vec2(r.x + r.w, r.y + r.h);
|
result[2] = gui_vec2(r.x + r.w, r.y + r.h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ==============================================================
|
* ==============================================================
|
||||||
*
|
*
|
||||||
@ -471,7 +470,6 @@ gui_utf_len(const gui_char *str, gui_size len)
|
|||||||
}
|
}
|
||||||
return src_len;
|
return src_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ==============================================================
|
* ==============================================================
|
||||||
*
|
*
|
||||||
@ -5146,21 +5144,29 @@ gui_end(struct gui_context *layout, struct gui_window *window)
|
|||||||
layout->height = MIN(layout->at_y - layout->bounds.y, layout->bounds.h);
|
layout->height = MIN(layout->at_y - layout->bounds.y, layout->bounds.h);
|
||||||
|
|
||||||
/* draw the correct footer */
|
/* draw the correct footer */
|
||||||
footer.x = window->bounds.x;
|
if (layout->offset.x > 0) {
|
||||||
footer.w = window->bounds.w + scrollbar_size;
|
footer.x = window->bounds.x;
|
||||||
footer.h = layout->footer_h;
|
footer.w = window->bounds.w + scrollbar_size;
|
||||||
if (layout->flags & GUI_WINDOW_COMBO_MENU)
|
footer.h = layout->footer_h;
|
||||||
footer.y = window->bounds.y + layout->height;
|
if (layout->flags & GUI_WINDOW_COMBO_MENU)
|
||||||
else footer.y = window->bounds.y + layout->height + layout->footer_h;
|
footer.y = window->bounds.y + layout->height;
|
||||||
gui_command_buffer_push_rect(out, footer, 0, config->colors[GUI_COLOR_WINDOW]);
|
else footer.y = window->bounds.y + layout->height + layout->footer_h;
|
||||||
|
gui_command_buffer_push_rect(out, footer, 0, config->colors[GUI_COLOR_WINDOW]);
|
||||||
|
|
||||||
if (!(layout->flags & GUI_WINDOW_COMBO_MENU)) {
|
if (!(layout->flags & GUI_WINDOW_COMBO_MENU)) {
|
||||||
struct gui_rect bounds;
|
struct gui_rect bounds;
|
||||||
bounds.x = layout->bounds.x;
|
bounds.x = layout->bounds.x;
|
||||||
bounds.y = window->bounds.y + layout->height;
|
bounds.y = window->bounds.y + layout->height;
|
||||||
bounds.w = layout->width;
|
bounds.w = layout->width;
|
||||||
bounds.h = layout->row.height;
|
bounds.h = layout->row.height;
|
||||||
gui_command_buffer_push_rect(out, bounds, 0, config->colors[GUI_COLOR_WINDOW]);
|
gui_command_buffer_push_rect(out, bounds, 0, config->colors[GUI_COLOR_WINDOW]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
footer.x = window->bounds.x;
|
||||||
|
footer.y = window->bounds.y + layout->height;
|
||||||
|
footer.w = window->bounds.w + scrollbar_size;
|
||||||
|
footer.h = 0;
|
||||||
|
layout->footer_h = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user