fix clicking outside camera joystick_rotate triggered rotation with non-square shape#209
Open
chanayane wants to merge 1 commit intoFirestormViewer:masterfrom
Open
fix clicking outside camera joystick_rotate triggered rotation with non-square shape#209chanayane wants to merge 1 commit intoFirestormViewer:masterfrom
chanayane wants to merge 1 commit intoFirestormViewer:masterfrom
Conversation
…as not a perfect square
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an annoying bug with the Camera Roll buttons under the camera joystick, they were tricky to click.
It was possible to click outside the joystick because it was only ignoring clicks out of its circle shape when it was a perfect square.
So it was tricky to actually click on the little buttons, sometimes you would trigger unwanted camera rotations instead of tilting it.
I changed it to a point-in-ellipse check and it's no longer possible to click outside the joystick, like it was doing in the Camera Phototools (in which the joystick was a perfect square so it worked as intented).
Since pointInCircle wasn't used anywhere else, I think it's safe to change that check.
Firestorm Pull Request Checklist
Thank you for contributing to the Phoenix Firestorm Project.
We will endeavour to review you changes and accept/reject/request changes as soon as possible.
Please read and follow the Firestorm Pull Request Guidelines to reduce the likelihood that we need to ask for "Bureaucratic" changes to make the code comply with our workflows.