Hi Jon,
To use colours in processing you need to use the color() method to generate an integer containing colour information.
Usually, you would type:
color red = color(255, 0, 0);
This is equivalent to saying:
int red = color(255, 0, 0);
Please read more about color method in the processing manual:
http://processing.org/reference/color_.html
So, to change the colours of a MyGUI object or group, you need to get the MyGUIStyle reference for a particular object, or assign a new instance of MyGUIStyle. Once you have a reference, you can then set individual colours or tint the overall shade.
For example- Tinting is the quickest way:
Code:
...
// Initialise MyGUI objects
gui = new MyGUI(this);
button = new MyGUIButton(this, 30, 20, "Random", 40, 16);
slider = new MyGUIPinSlider(this, 140, 20, 160, 12, 1, 16);
checkbox = new MyGUICheckBox(this, 240, 20, "Pause");
// Add elements to main MyGUI group
gui.add(button);
gui.add(slider);
gui.add(checkbox);
// Set interface colour
gui.getStyle().tintColor(color(245, 128, 0)); // Sets a yellow tint
...
Taken from: http://mkv25.net/applets/guiRandomSquares/guiRandomSquares.pde
Also see this MyGUI Fonts example:
http://mkv25.net/applets/guiFonts/guiFonts.pde
- Creating and applying new style objects
Regards,
- Markavian