[sldev] UI events: (VWR-10924) Magical scripted HUD/UI
Mike Monkowski
monkowsk at watson.ibm.com
Fri Sep 4 07:57:29 PDT 2009
You would expect that mouse-down on a button, move away, mouse-up off
the button would send just the mouse-down event, but there's no
guarantee that it doesn't send a mouse-up event when moving away from
the button. I have to run the trace function to see what actually happens.
I know that the atomic event are usually sent and the event handler
decides what to act upon, but in this case, we're sending messages over
the chat channel, and less is better. But after thinking about it for a
while, I realized that the functionality of the push-to-talk button
requires both events separately.
Alternately, the XML could indicate which events to send. We're
probably going to need to use the on_click tag to tie the button to a
text widget, so we could add an on_release tag as well.
Mike
danteferret at gmail.com wrote:
> On Sep 4, 2009 7:30am, Carlo Wood <carlo at alinoe.com> wrote:
> > On Thu, Sep 03, 2009 at 02:19:46PM -0400, Mike Monkowski wrote:
> >
> > If you press the mouse button while the pointer is on a button
> >
> > and then move the mouse away from the button before releasing it,
> >
> > then that button is not 'clicked'.
> >
> >
> >
> > So, only if you release the mouse button at a position that is
> >
> > over the same button as were it was pressed that should generate
> >
> > a 'clicked' event for buttons.
> >
>
> It's pretty standard for any system to send both "on_click" and
> "released" events. Simply becuase it should be up to the program whether
> it wants to wait for release or just on click to perform an action.
More information about the SLDev
mailing list