I'm playing around with double-clicks and took a window
(which will go to minimized state after double-click)
Now I will do the following
double-click, 2 sec pause, double-click
-> everything works perfect, window is closed
on the first double-click and opened on the 2nd.
double-click, 1/2 sec pause, double-click
-> now the second double-click is ignored...
I tried playing around with setSingleClickTimeout
and setMultiClickTimeout, but I couldn't get it
to behave like I would expect...
note: The same "ignore second double-click" also goes for buttons
Any ideas on this?
Regards
Roger
Double click
Moderators: CEGUI MVP, CEGUI Team
Re: Double click
Ah, I figured it out - it can be done by setting
setWantsMultiClickEvents to false for the button.
One minor thing, I also set setWantsMultiClickEvents
to false for the window, but the closeButton
ignored this setting.
Obviously you can set it when you create the close-button
and get the pointer to it, but maybe the window should
pass the setting to the close-button automatically?
especially since apparently it's impossible to get
the pointer to this button later, unless you store it
somewhere yourself...
Regards
setWantsMultiClickEvents to false for the button.
One minor thing, I also set setWantsMultiClickEvents
to false for the window, but the closeButton
ignored this setting.
Obviously you can set it when you create the close-button
and get the pointer to it, but maybe the window should
pass the setting to the close-button automatically?
especially since apparently it's impossible to get
the pointer to this button later, unless you store it
somewhere yourself...
Regards
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Double click
What I really want to do is to have the multi-clicks disabled by deafult (since most widgets do not need it), though I get the feeling I'll break a lot of peoples code if I do that.
The issue about timings for the multi-clicks is a small bug, I have a fix but can't put it into HEAD at the moment due to so many other outstanding changes I have in my working copy. I'll commit the fix to 0.2.0 branch later on tonight.
CE.
The issue about timings for the multi-clicks is a small bug, I have a fix but can't put it into HEAD at the moment due to so many other outstanding changes I have in my working copy. I'll commit the fix to 0.2.0 branch later on tonight.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Double click
Thanks for the quick reply!
Just an idea, maybe there should be a function System::setDefaultMultiClickAware() and controls will get
this value (default would be true to not break existing code) - so we don't have to set this seperately for every control we want to create.
I'd also like to know if it's possible to get to the
titlebar & closebutton-pointers, so we can call
whatever setXXX-functions on them...
Regards,
Roger
What I really want to do is to have the multi-clicks disabled by deafult (since most widgets do not need it), though I get the feeling I'll break a lot of peoples code if I do that.
Just an idea, maybe there should be a function System::setDefaultMultiClickAware() and controls will get
this value (default would be true to not break existing code) - so we don't have to set this seperately for every control we want to create.
I'd also like to know if it's possible to get to the
titlebar & closebutton-pointers, so we can call
whatever setXXX-functions on them...
Regards,
Roger
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Double click
kitt3n wrote:
Just an idea, maybe there should be a function System::setDefaultMultiClickAware() and controls will get
this value (default would be true to not break existing code) - so we don't have to set this seperately for every control we want to create.
Thanks for the suggestion. This actually inspires something on a more grand scale which would also satisfy an item on my TODO list. Basically what I envision is a DefaultPropertyManager (or something) which can have property names registered along with a default, these can be updated at any time and also loaded as part of a scheme xml file. Whenever a new window/widget gets created, it would go to the DefaultPropertyManager and say, "hello, I'm a <widget type> window. Initialise me!". Obviously there's a few things that would have to be sorted out, but I think this would be a really useful thing to have in the system.
I'd also like to know if it's possible to get to the
titlebar & closebutton-pointers, so we can call
whatever setXXX-functions on them...
Doing that is potentially dangerous and you may blow yourself out of the water (and things may break later on), however, this is possible by using the WindowManager to get the widgets by name. The following examples assume a FrameWindow named "MyWindow":
For the close button:
Code: Select all
WindowManager::getSingleton().getWindow("MyWindow__auto_closebutton__");
For the title bar:
Code: Select all
WindowManager::getSingleton().getWindow("MyWindow__auto_titlebar__");
HTH
CE.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 11 guests