UI: avoid subtracting shadow from winrct

For popup interactions we need to know if events are in the region or not,
however subtracting the shadow isn't so reliable, since its not always added to all sides of a popup.

Instead, get the winrct value from a popup using the block rect, otherwise the winrct as-is.
This commit is contained in:
2015-08-18 14:16:58 +10:00
parent a08f8a4708
commit 6cee6607a2
5 changed files with 36 additions and 24 deletions

View File

@@ -450,6 +450,7 @@ extern void ui_window_to_block_fl(const struct ARegion *ar, uiBlock *block, floa
extern void ui_window_to_block(const struct ARegion *ar, uiBlock *block, int *x, int *y);
extern void ui_window_to_region(const ARegion *ar, int *x, int *y);
extern void ui_region_to_window(const struct ARegion *ar, int *x, int *y);
extern void ui_region_winrct_get_no_margin(const struct ARegion *ar, struct rcti *r_rect);
extern double ui_but_value_get(uiBut *but);
extern void ui_but_value_set(uiBut *but, double value);