Merge pull request #19 from luknw/master
Fix off-by-one error in NK_INTERSECT
This commit is contained in:
commit
bb7c2519a3
@ -5622,7 +5622,8 @@ struct nk_context {
|
||||
#define NK_INBOX(px, py, x, y, w, h)\
|
||||
(NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h))
|
||||
#define NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1) \
|
||||
(!(((x1 > (x0 + w0)) || ((x1 + w1) < x0) || (y1 > (y0 + h0)) || (y1 + h1) < y0)))
|
||||
((x1 < (x0 + w0)) && (x0 < (x1 + w1)) && \
|
||||
(y1 < (y0 + h0)) && (y0 < (y1 + h1)))
|
||||
#define NK_CONTAINS(x, y, w, h, bx, by, bw, bh)\
|
||||
(NK_INBOX(x,y, bx, by, bw, bh) && NK_INBOX(x+w,y+h, bx, by, bw, bh))
|
||||
|
||||
@ -25475,6 +25476,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
|
||||
/// - [yy]: Minor version with non-breaking API and library changes
|
||||
/// - [zz]: Bug fix version with no direct changes to API
|
||||
///
|
||||
/// - 2019/12/10 (4.01.5) - Fix off-by-one error in NK_INTERSECT
|
||||
/// - 2019/10/09 (4.01.4) - Fix bug for autoscrolling in nk_do_edit
|
||||
/// - 2019/09/20 (4.01.3) - Fixed a bug wherein combobox cannot be closed by clicking the header
|
||||
/// when NK_BUTTON_TRIGGER_ON_RELEASE is defined.
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "nuklear",
|
||||
"version": "4.01.4",
|
||||
"repo": "vurtun/nuklear",
|
||||
"version": "4.01.5",
|
||||
"repo": "Immediate-Mode-UI/Nuklear",
|
||||
"description": "A small ANSI C gui toolkit",
|
||||
"keywords": ["gl", "ui", "toolkit"],
|
||||
"src": ["nuklear.h"]
|
||||
|
@ -8,6 +8,7 @@
|
||||
/// - [yy]: Minor version with non-breaking API and library changes
|
||||
/// - [zz]: Bug fix version with no direct changes to API
|
||||
///
|
||||
/// - 2019/12/10 (4.01.5) - Fix off-by-one error in NK_INTERSECT
|
||||
/// - 2019/10/09 (4.01.4) - Fix bug for autoscrolling in nk_do_edit
|
||||
/// - 2019/09/20 (4.01.3) - Fixed a bug wherein combobox cannot be closed by clicking the header
|
||||
/// when NK_BUTTON_TRIGGER_ON_RELEASE is defined.
|
||||
|
@ -5403,7 +5403,8 @@ struct nk_context {
|
||||
#define NK_INBOX(px, py, x, y, w, h)\
|
||||
(NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h))
|
||||
#define NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1) \
|
||||
(!(((x1 > (x0 + w0)) || ((x1 + w1) < x0) || (y1 > (y0 + h0)) || (y1 + h1) < y0)))
|
||||
((x1 < (x0 + w0)) && (x0 < (x1 + w1)) && \
|
||||
(y1 < (y0 + h0)) && (y0 < (y1 + h1)))
|
||||
#define NK_CONTAINS(x, y, w, h, bx, by, bw, bh)\
|
||||
(NK_INBOX(x,y, bx, by, bw, bh) && NK_INBOX(x+w,y+h, bx, by, bw, bh))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user