Skip to content

Conversation

@sahej-dev
Copy link

I have added support for all P5 rectModes. All the following are valid:

myButton = new Clickable();
myButton.rectMode = CORNER; // Default
myButton.rectMode = CORNERS;
myButton.rectMode = CENTER;
myButton.rectMode = RADIUS;
  • Click area, button rect, image, and text scaling should be working, as expected with all the rectModes.
  • Changing rectMode by doing (for e.g. rectMode(CENTER) should no longer affect clickables. myButton.rectMode = CENTER must be used.
  • I have also update the minified version with the latest version of the library.

I have tried not to change up the existing structure of the library too much. Please let me know if I should make any further improvements/changes to this PR.

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.

1 participant