Updownquark / Quick

Quark's User Interface Creation Kit
0 stars 0 forks source link

Fix mouse events to ensure that elements under transparent widgets may get notified #13

Closed Updownquark closed 12 years ago

Updownquark commented 12 years ago

Right now, only a single path to the deepest, highest-Z element under the mouse gets the mouse event. This is a bug. The mouse event needs to have a tree whose branches end with every element under the mouse down to the first element below the mouse that is not transparent (this property needs to be added to the element)--these need to be ordered by reverse-Z so the event gets fired to the correct elements first.

As part of this, the mouse event needs a consumed attribute that is set when an element believes the mouse event was intended for it. Consumed events may either not propagate at all to the rest of the elements or they may propagate differently somehow. It can't just be an attribute for listeners to check. Most listeners won't care about consumed events.