View Single Post
  #1  
Old 04-08-2009, 09:43 AM
moooh moooh is offline
Member
 
Join Date: Dec 2008
Posts: 19
button events when drawing over gui elements

I have a quad that I'm drawing that acts as sort of like an info screen that can be shown/hidden by pressing a key. The quad contains several different areas that can be clicked and the chosen area is determined in a mousedown event.

Part of this quad, when visible, overlaps a vizinfo menu that contains buttons. I've made sure that the quad is drawn over the menu, however, when clicking at the spots that overlap the vizinfo buttons, the button events are fired instead and the mousedown event is skipped completely. This has probably something to do with GUI elements like buttons being considered always in front when clicking.

The drawOrder of the elements does not seem to affect which event is fired.
I have tried switching around priorities for the menu onButton event and the mousedown event callbacks but that didn't help either.

One workaround would be to disable the buttons in the menu when the quad is visible, however the buttons are not easily accessible from the part of the code that deals with opening and closing this infowindow.
Just wanted to ask if there's some way to make the mousedown event have the same internal priority that the GUI components seem to enjoy.
Reply With Quote