← Back

ofxEAVIGUI

github.com/chriskiefer/ofxEAVIGUI · @chriskiefer
OF 0.8 GUI

A GUI system for OpenFrameworks, for desktop and iOS

4 2 Last commit 12y ago Created 13y ago

Forks

Forks pushed to more recently than chriskiefer/ofxEAVIGUI itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

simonkatan-research-archive/ofxEAVIGUI by @simonkatan-research-archive · ★ 0 · pushed 11y ago

README

ofxEAVIGUI



A GUI system for OpenFrameworks, for desktop and iOS

Features:

This project is currently under development, full documentation and a demo will follow.

In brief, this is an example of some code for iOS

--- in app.h

``c++ //add the listener to your app class class GUIApp : public ofxiPhoneApp, public EAVIGUI::InterfaceListener {


 --- in app.mm
c++

enum guiIDS {BUTTON1};

void setup() {

button = new EAVIGUI::ImageButton(callback, BUTTON1, 0, 0, "button.png", "buttonOver.png"); //initialise a button button->setRelativePositioning(0.5, -button->getScaledWidth()/2.0, 0.5, -button->getScaledHeight()/2.0); //relative position, for screen rotations EAVIGUI::InterfaceManager::addObject(button); //add to gui button->setVisible(true);

EAVIGUI::InterfaceManager::setup();

}

void handleInterfaceEvent(int intid, int eventTypeId, EAVIGUI::InterfaceObject *object) { cout << "Interface: " << intid << ", " << eventTypeId << endl;

if (intid == BUTTON1) { switch(eventTypeId) { case EAVIGUI::InterfaceObject::TOUCHDOWN: //do something break; case EAVIGUI::InterfaceObject::TOUCHUP: case EAVIGUI::InterfaceObject::TOUCHEXIT: //do something else break; } } }
``

Get this addon

HTTPS
SSH