Problem about onMouseDoubleClicked

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

houhou_x
Just popping in
Just popping in
Posts: 3
Joined: Fri Oct 10, 2008 03:54

Problem about onMouseDoubleClicked

Postby houhou_x » Sat Sep 25, 2010 08:25

Hi,
I have two problem about onMouseDoubleClicked.

Code: Select all

       
 if (d_generateMouseClickEvents && ma.window->wantsMultiClickEvents())
        {
            switch (tkr.d_click_count)
            {
            case 1:
                ma.window->onMouseButtonDown(ma);
                break;

            case 2:
                ma.window->onMouseDoubleClicked(ma);
                break;

            case 3:
                ma.window->onMouseTripleClicked(ma);     
                break;
            }
        }

1).If d_generateMouseClickEvents is true, onMouseDoubleClicked is not handled by CEGUI, so the game app recieved the event.(onMouseTripleClicked also)
2).Whether onMouseButtonDown will be fired before onMouseDoubleClicked or onMouseTripleClicked?

Thanks :rofl:

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Problem about onMouseDoubleClicked

Postby Jamarr » Tue Sep 28, 2010 19:09

Please post in the correct forum next time.

houhou_x wrote:1).If d_generateMouseClickEvents is true, onMouseDoubleClicked is not handled by CEGUI, so the game app recieved the event.(onMouseTripleClicked also)


I assume what you mean to say here is that the Double- and Triple-click events are not treated the same as the ButtonDown event in the sense that ButtonDown always marks the event as handled, where as Double- and Triple-click do not. If this is the case, then I would agree this inconsistency should be corrected - double or triple (or any form of) clicking on a window (even if nothing happens) should return true from the System::inject* methods - this can essentially be translated to activating the window (even if it is already active). To put it another way, this ensures that click-events do not 'pass-through' the window when pass-through is disabled. I think this is a bug - hopefully CE will see it that way as well.

2).Whether onMouseButtonDown will be fired before onMouseDoubleClicked or onMouseTripleClicked?


By default, yes. If you have wantsMultiClickEvents enabled, no - note however this requires that you inject the double- and triple-click events yourself via injectMouseButtonDoubleClick/injectMouseButtonTripleClick. You can find more on this discussion by searching the forums (as you did before posting, right?):
viewtopic.php?f=10&t=4000&hilit=double+click
viewtopic.php?f=5&t=4034&p=19743&hilit=cooked+events
http://www.cegui.org.uk/mantis/view.php?id=299
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Problem about onMouseDoubleClicked

Postby CrazyEddie » Wed Sep 29, 2010 09:22

Jamarr wrote:I assume what you mean to say here is that the Double- and Triple-click events are not treated the same as the ButtonDown event in the sense that ButtonDown always marks the event as handled, where as Double- and Triple-click do not. If this is the case, then I would agree this inconsistency should be corrected - double or triple (or any form of) clicking on a window (even if nothing happens) should return true from the System::inject* methods - this can essentially be translated to activating the window (even if it is already active). To put it another way, this ensures that click-events do not 'pass-through' the window when pass-through is disabled. I think this is a bug - hopefully CE will see it that way as well.

I'll add the injectMouseButtonDown return inconsistency to mantis as a bug.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests