Fixed #502 nk_item_is_any_active for hidden window

This commit is contained in:
vurtun 2017-08-27 17:12:19 +02:00
parent 7c089a5f09
commit afa76f52ab
2 changed files with 6 additions and 4 deletions

View File

@ -11,6 +11,7 @@
Changes:
--------
- 2017/08/27 (1.40.8) - Fixed `nk_item_is_any_active` for hidden windows
- 2017/08/27 (1.40.7) - Fixed window background flag
- 2017/07/07 (1.40.6) - Fixed missing clipping rect check for hovering/clicked
query for widgets

View File

@ -1,5 +1,5 @@
/*
Nuklear - 1.40.7 - public domain
Nuklear - 1.40.8 - public domain
no warranty implied; use at your own risk.
authored from 2015-2017 by Micha Mettke
@ -18824,6 +18824,10 @@ nk_window_is_any_hovered(struct nk_context *ctx)
while (iter) {
/* check if window is being hovered */
if(!(iter->flags & NK_WINDOW_HIDDEN)) {
/* check if window popup is being hovered */
if (iter->popup.active && iter->popup.win && nk_input_is_mouse_hovering_rect(&ctx->input, iter->popup.win->bounds))
return 1;
if (iter->flags & NK_WINDOW_MINIMIZED) {
struct nk_rect header = iter->bounds;
header.h = ctx->style.font->height + 2 * ctx->style.window.header.padding.y;
@ -18833,9 +18837,6 @@ nk_window_is_any_hovered(struct nk_context *ctx)
return 1;
}
}
/* check if window popup is being hovered */
if (iter->popup.active && iter->popup.win && nk_input_is_mouse_hovering_rect(&ctx->input, iter->popup.win->bounds))
return 1;
iter = iter->next;
}
return 0;