ppizarror / pygame-menu

A menu for pygame. Simple, and easy to use
https://pygame-menu.readthedocs.io/
Other
555 stars 141 forks source link

Add method to dropselect API that tells if its dropdown is expanded #469

Open BeXXsoR opened 1 year ago

BeXXsoR commented 1 year ago

Background: I have a dropselect widget and another widget beneath it, both with an 'on_mouse_over'-method attached. When I use the dropdown of the dropselect widget, it overlaps with the second widget. When trying to select an item from the dropdown, the mouseover-functions of the 2nd widget is executed (understandable, but not desired). In order to adjust my mouseover-method, I looked for a method in the dropselect API that shows if its dropdown is expanded, but couldn't find one. The only workaround I've found is to use the get_focus_rect method of the dropselect API, as this one changes when the dropdown is expanded. But that isn't very intuitive imo.

Request: I suggest to add a separate method to the dropselect API that tells if its dropdown is expanded.