Buttons respond 1 out of 3 times w/ SDL and OpenGL

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

Ralith
Just popping in
Just popping in
Posts: 1
Joined: Fri Jun 08, 2007 06:38

Buttons respond 1 out of 3 times w/ SDL and OpenGL

Postby Ralith » Fri Aug 03, 2007 20:41

Subject gives a basic description of the issue; for all Button objects, defined as below:

Code: Select all

<Window Type="TaharezLook/Button" Name="ExitButton">
  <Property Name="UnifiedPosition" Value="{{0.55,0},{0.60,0}}" />
  <Property Name="UnifiedSize" Value="{{0,50},{0,30}}" />
  <Property Name="Text" Value="Exit" />
</Window>

the button only reacts to a press of mouse button 1 while the pointer is over it every third time. Other widgets, such as the spinner, appear to behave correctly, and respond as expected to all input. I've confirmed this behavior by rebuilding and running on three different systems.

Also, as a side issue, is there any way to get buttons to automatically scale their width to accommodate the text they contain?

balizeiro
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 26, 2007 21:46

Postby balizeiro » Wed Sep 05, 2007 22:42

Did you find any solution to your problem?
Because sometimes I need to press the buttons 2 or 3 times to make them work.
Maybe some bug? :?

ilveroluca
Just popping in
Just popping in
Posts: 5
Joined: Thu Jul 12, 2007 13:56

Postby ilveroluca » Thu Sep 06, 2007 09:10

I'm having the same problem. The button generates single, double, and triple click events, even though the mouse clicks are seconds apart.

click 1 - EventClicked
click 2 - EventMouseDoubleClick
click 3 - EventMouseTripleClick
click 4 - EventClicked
click 5 - EventMouseDoubleClick
click 6 - EventMouseTripleClick
click 7 - EventClicked
...

My mouse events are being injected properly. I'm suspecting a problem related to the double/triple click timeout. I'm injecting a time pulse every 1/30s, although looking at the code it doesn't look like that that time is used to measure the distance in time between clicks. Suggestions?

ilveroluca
Just popping in
Just popping in
Posts: 5
Joined: Thu Jul 12, 2007 13:56

Postby ilveroluca » Thu Sep 06, 2007 09:58

I've tracked it down to an erroneous use of clock() in class SimpleTimer in CEGUISystem.cpp. I'll file a bug report. In the meantime, a work-around might be to set wantsMultiClickEvents to false. Is there a way to make this property default to false?

ilveroluca
Just popping in
Just popping in
Posts: 5
Joined: Thu Jul 12, 2007 13:56

Postby ilveroluca » Thu Sep 06, 2007 10:11

Filed a bug report for this issue: http://www.cegui.org.uk/mantis/view.php?id=153


Return to “Help”

Who is online

Users browsing this forum: No registered users and 15 guests