Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Button.cpp, the doubleclickFound flag is not cleared #5

Open
mrtktabornsr opened this issue May 14, 2022 · 1 comment
Open

In Button.cpp, the doubleclickFound flag is not cleared #5

mrtktabornsr opened this issue May 14, 2022 · 1 comment

Comments

@mrtktabornsr
Copy link

In Button.cpp, the doubleclickFound flag is not cleared until the next time the button is pressed. The Button::isDoubleClicked() member will return true every time it is called until the button is pressed again. The Button::isDoubleClicked() member could be used to clear the flag once it is read.

bool Button::isDoubleClicked(bool proc)
{
bool currentFlagState ;
if(proc) process();
currentFlagState = doubleclickFound; //-------- remember the current flag state
doubleclickFound = false; //-------- clear the doubleclickFound flag
return currentFlagState; //------------ return the actual dooubleclick state
}

@t3db0t
Copy link
Owner

t3db0t commented May 15, 2022

Thank you for the bug report! If you're willing to make a pull request, I'd be happy to merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants