TButton v0.11
in
Share your Work
•
3 years ago
Hi folks, I am new to the Processing and this forum. Reading some of the posts it seemed several beginners like myself tried doing a button class to help learn OOP, so I decided to try the same approach. TButton is a basic 2d text button class meant to be used in default graphics mode (JAVA2D), allowing you to :
- Set button size
- load a ttf font for display of the button text
- select button and text colours for normal, mouseover, and pressed modes
- set bevel size for pressed and un-pressed button. Bevel colours are created automatically from the button colour.
- The only class method is "pos", which allows you to set the button location.
You can check it out at
http://bwong.ca/TButton_01.html
The code is completely undocumented, but pretty easy to understand. I would appreciate any comments or suggestions.