About Store Forum Documentation Contact



Post Reply 
Possible Button Bug
Author Message
Scarlet Thread Offline
Member

Post: #1
Possible Button Bug
Hi,

I've used buttons and other Gui objects plenty before and I'm baffled at what is currently happening. It seems as though the button mode will not go to BUTTON_DEFAULT by default or even if I set it explicitly.

I want the button to only register a click when I release the mouse.... but It is registering continuously while the mouse is down now.... I have it attached to a number so when I click it the number increments. However, now I can't click fast enough and it increments 3 at once since it registers on mouse down and not mouse release.

So confused why this is happening. Not sure if is a bug but as I say I've used Gui in EE so many times and never had this problem. Thanks.
10-01-2013 01:16 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Possible Button Bug
Hi!
Could you please attach a sample 2.0 project with the issue reproduced?
Thank you!

I don't think there's an issue in the button class.
Are you using button.func(..) ?
10-02-2013 06:24 AM
Find all posts by this user Quote this message in a reply
Scarlet Thread Offline
Member

Post: #3
RE: Possible Button Bug
(10-02-2013 06:24 AM)Esenthel Wrote:  Are you using button.func(..) ?

Hmmm no I wasn't. But this might just be the problem.

Re-reading the header files:
Code:
Bool    operator()()C {return _on ;} // get button state

Previously I thought this meant the state of the button as in clicked or not clicked.... However, now that you mentioned the callback, which I completely forgot about for some reason, it seems more like button state down or up...

In my past projects, usually clicking a button changes the state of the software completely making it impossible to click it twice in a row. If I gave it the chance to click twice by not changing the state it may behave the same in the other projects as well.

Pretty certain that's the issue. I'll change to callback and if I still have problems I'll send you the project. However, I'm pretty sure that's it.

Thanks wink .... Gotta love these dumb moments where you get brought back down to earth smile
(This post was last modified: 10-02-2013 08:30 AM by Scarlet Thread.)
10-02-2013 08:28 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Possible Button Bug
Hi! Yeah hope using .func will solve the issue smile and yes the operator() is for the on/off state
10-03-2013 12:23 AM
Find all posts by this user Quote this message in a reply
Post Reply