Skip to content

Added ability to align button text to the left, right or center#30

Closed
franklinscudder wants to merge 3 commits into
Lartu:masterfrom
franklinscudder:master
Closed

Added ability to align button text to the left, right or center#30
franklinscudder wants to merge 3 commits into
Lartu:masterfrom
franklinscudder:master

Conversation

@franklinscudder

Copy link
Copy Markdown

Text Alignment

While using Clickables in my own projects, I modified the source to allow the button text to be aligned horizontally against either the left or right edges. This is implemented with a Clickable.textAlign and a Clickable.textPadding property that can be modified to position text as desired while leaving the default behavior the same as before (i.e. textAlign(CENTER) etc.).

Example

Code

image

Output

image

@Lartu

Lartu commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Hi there! I’m back! Thank you so much for your pull request. That said, I’m going to close it because I’ve changed the API while updating the library to p5.js 2.x, and p5.clickable no longer manages how clickables look, only their interactions. Thank you very much for your contribution!

@Lartu Lartu closed this Jul 20, 2026
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