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

FButton isEnabled fix. #202

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

jpsarda
Copy link
Contributor

@jpsarda jpsarda commented Oct 5, 2013

If _isEnabled if false, we still get the HandleSingleTouchMoved and the HandleSingleTouchEnded as HandleSingleTouchBegan rightfully returns true. I just added a check of _touchDown in HandleSingleTouchMoved and HandleSingleTouchEnded to fix this.

If _isEnabled if false, we still get the HandleSingleTouchMoved and the HandleSingleTouchEnded as HandleSingleTouchBegan rightfully returns true. I just added a check of _touchDown in HandleSingleTouchMoved and HandleSingleTouchEnded to fix this.
@MattRix
Copy link
Owner

MattRix commented Oct 6, 2013

Hmm, I see what you're saying, although I'm not sure that the way you've fixed it is quite the right way to do it (though I think it's on the right track). _isTouchDown is basically just an indicator of whether the down element and down color should be used, not really something that's meant to be used for logical checks. I don't think checking for _isTouchDown in TouchBegan makes a lot of sense to me, unless I'm missing something here? And also your return isn't returning a boolean value.

I should note that part of the reason this issue occurs is because the FButton is intended to keep blocking touches when isEnabled is false.

@jpsarda
Copy link
Contributor Author

jpsarda commented Oct 6, 2013

Oops must have made an error when reporting the fix locally. The check was not supposed to be in touch began.

If touchIsDown means what it says ( touch is down ) I think that's the perfect value to check. You could create another bool property for this but it will be the exact same value as touchIsDown. Unless you have a smarter way of fixing this in mind. But yes touch began must return true to grab the touches so I don't see another simple way to fix this.

Anyway I'll commit a fix soon to see what I meant ( [edit] done )

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

Successfully merging this pull request may close these issues.

2 participants