diff --git a/blendish.h b/blendish.h index 124902c..bd06126 100644 --- a/blendish.h +++ b/blendish.h @@ -1248,26 +1248,26 @@ void bndSplitterWidgets(NVGcontext *ctx, float x, float y, float w, float h) { void bndJoinAreaOverlay(NVGcontext *ctx, float x, float y, float w, float h, int vertical, int mirror) { - + if (vertical) { float u = w; w = h; h = u; } - + float s = (wnumkids; } +UIrect uiGetAbsoluteRect(int item) { + UIrect rect = uiGetRect(item); + item = uiParent(item); + while (item >= 0) { + rect.x += uiItemPtr(item)->rect.x; + rect.y += uiItemPtr(item)->rect.y; + item = uiParent(item); + } + return rect; +} + +int uiContains(int item, int x, int y) { + UIrect rect = uiGetAbsoluteRect(item); + x -= rect.x; + y -= rect.y; + if ((x>=0) + && (y>=0) + && (xfrozen) return -1;