Picture of shaped buttons with Processing
I try to make an kiosk system with a touchscreen. The program language I chose is Processing Java.
The Buttons on the screen should not be just rectangular, they should be shaped.

If you ever tried to make shaped buttons with any programming language, you know it is hard.
I found an unusual and very easy way to make buttons in any shape you like.

You can see the result in the attached zip file (just unzip and open the "index.html" in your browser)
or here on www.openprocessing.com

Step 1: Paint the buttons

Picture of paint the buttons
You can create the buttons with a graphic program (e.g. Inkscape)
The dimensions should be the same as the window size of your program or applet.

Then you copy the buttons and fill the buttons with different colors.

colormap_button.svg(595x842) 22 KB
hondaman9003 years ago
Nice I'ble.

What do you use for printing out your Processing sketches? The native Processing IDE sucks at printing out code, and I'd like to have line numbers.

lighttamer (author)  hondaman9003 years ago

I used the Notepad++ with the "JAVA" text-highlighting.

Greetings from Germany
owaunz5 years ago
Do you have an email address ? Mine is owaunz@gmail.com
smessud5 years ago
 Pretty clever!!
This will work not only with well defined buttons, but with any zone of a screen as long as you have the "look-up image" beneath.

It may not be new but it's worth a five-start to me.