SimpleGUI is a new code block developed by me for Cinder library. It's simple set of GUI widgets to speed up testing of your applications. It was inspired by ControlP5 library for Processing and I already used it for projects like Cindermedusae, Dualism or Pattern.
All the source code together with examples is available as part of my MowaLibs in GitHub repo: github.com/vorg/MowaLibs
Include header file and add sgui namespace.
include SimpleGUI.h using namespace mowa::sgui;
Declare pointer to SimpleGUI and some variables you want to control.
SimpleGUI* gui; float rotation; int size; ColorA color;
In the setup() function create new SimpleGUI object passing pointer to the main App that will be used for event handling.
gui = new SimpleGUI(this);
Next step is to add one label and some parameters with min, max and default values.
gui->addLabel("CONTROLS"); gui->addParam("Rotation", &rotation, 0, 360, 0); gui->addParam("Size", &size, 100, 600, 200);
SimpleGUI supports olso RGBA color sliders.
gui->addParam("Color", &color, ColorA(0,0.5,1,0.5));
Last step is to draw the gui at the end of your draw() function.
If you have any doubts there are three examples in the repository that you can use for reference.
Updated: In the latest example I show how to use buttons and texture previews.