Detect expanded state of drop down menu #509
-
HI, I have drop down menu whose expanded state overlaps rectangles which are clickable as part of a game. Beause the collidepoint of the game rect's and mouse still intersect when the drop down is selected the rectangles react underneath the expanded drop down. Is there a way of detecting that the drop down has expanded (and closed) so I can enable/disable the game rects collidepoint check when the drop down is in use? Many Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey matt, You should be able to use the return value of
Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks it worked. I went with:
Just trying to avoid the string literal. Thanks again for your help |
Beta Was this translation helpful? Give feedback.
Hey matt,
You should be able to use the return value of
ui_manager.process_events()
to see if pygame GUI used a click (or other event). Failing that the drop down itself has:Hope that helps.