Controlp5 TextAlign

Hi Guys,

I’m trying to add a buttonRadio that control text Align, but I don’t know how to assign a variable that control the LEFT and CENTER button.

I’m using Processing width controlp5 library.

Thanks a lot.!

1 Like

I’m not sure if you can put a variable in textAlign(). However, you could create a variable (a boolean if you only need LEFT and CENTER) and when this variable changes, you change the the text align mode.
E.g. if the variable is now true then run textAlign(LEFT) and if the variable is now false then run textAlign(CENTER).

2 Likes