openFrameworks addon for keyboard-controlled settings panels that persist calibration values to XML.
README
ofxKeyboardSettings
Small openFrameworks addon for building keyboard-controlled settings panels that persist values to XML.
The addon is intentionally simple: hold an access key to show the overlay, move through properties with the arrow keys, and tweak values without wiring up a GUI. It is useful for older installation sketches, quick calibration surfaces, and projects where a visible GUI would be too much.
Usage
ofxKeyboardSettings settings;
float radius = 30.0f;
bool fill = true;
void ofApp::setup(){
settings.setup('s', "Settings");
settings.addProperty(&radius, "Circle_Radius", 20.0f, 80.0f, 1.0f, 30.0f);
settings.addProperty(&fill, "Fill_Shape", true);
}
void ofApp::draw(){
settings.draw();
}
void ofApp::keyPressed(int key){
settings.keyPressed(key);
}Hold the access key for three seconds to toggle the panel. Values are saved to
bin/data/<label>.xml.Compatibility
Tested with openFrameworks 0.12.1 on macOS.
Requires the bundled
ofxXmlSettings addon.The example includes the standard openFrameworks Makefile flow:
cd example
make Debug
make RunDebug Get this addon
Latest release
Maintenance release for current openFrameworks projects.
- Modernizes the example window setup and Makefile build.
- Fixes the left-arrow minimum-bound check for editable properties.
- Updates drawing calls and XML save/load usage for newer openFrameworks.
- Refreshes the README with a clearer setup path.
make Debug using openFrameworks 0.12.1 on macOS.
ofxAddons