I agree with quaks, cp5 will help a lot in this project. (@quarks, funny you aren't suggesting your own :)) from what I ahve found, controlp5 elements all have their labels set slightly differently, should be documented
here
I was able, for example, to get and change the label of a Bang like this:
- gen = cp5.get(Bang.class, "generate pdf").setLabel("Loading...");
"generate pdf" being the button name (not the label) and I am changing the text to 'Loading' I also save the item in a varable "gen" to change it later too. there are quite a few color and styling options in the classes too, but some are a bit obscure (I have to get the button, get the text inside, then start changing it... I guess there's not really another way to get at that). here's one of the longer ones I am using to create a textfield, populate it with the date and change the styling of it:
- cp5.addTextfield("start month").setPosition(15, 70).setSize(50,25).setText(c.get(Calendar.MONTH)+1+"").
setFont(f2).setColorCursor(75).setColorForeground(75).setColorBackground(color(239, 244, 239)).
setColor(75).getCaptionLabel().setFont(f3).setText("month").toUpperCase(false).setColor(75);
I was quite surprised of how many options there were, albeit verbose to get to some of them. I think it could work well in your case.
Lastly, the controlEvent:
- void controlEvent(ControlEvent theEvent) {
- // awesome code to react to control events
- }
Is useful to capture and react to all your buttons. Then it's just a matter of laying out all the buttons in a grid.
sounds like a (crazy client request...) ...fun project :)
good luck,
ak