UI: simplify check for active menu button

Dragging to select another popup now checks the menus active button.
This commit is contained in:
2019-07-31 18:45:07 +10:00
parent ce0582ee2b
commit 94b81d51a6
3 changed files with 33 additions and 17 deletions

View File

@@ -938,6 +938,9 @@ uiBut *ui_region_find_active_but(struct ARegion *ar) ATTR_WARN_UNUSED_RESULT;
bool ui_region_contains_point_px(const struct ARegion *ar, int x, int y) ATTR_WARN_UNUSED_RESULT;
bool ui_region_contains_rect_px(const struct ARegion *ar, const rcti *rect_px);
ARegion *ui_screen_region_find_mouse_over_ex(bScreen *screen, int x, int y);
ARegion *ui_screen_region_find_mouse_over(bScreen *screen, const struct wmEvent *event);
/* interface_context_menu.c */
bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but);
void ui_popup_context_menu_for_panel(struct bContext *C, struct ARegion *ar, struct Panel *pa);