Exemplo n.º 1
0
void GUI::addHUDTextGUI()
{
    string title = "HUD TEXT";
    ofxUICanvas* gui = getNewGUI(title);
	
	gui->addSlider("X Margin", 0, 500, &app->scene.xMargin, length, dim);
	gui->addSlider("Y Margin", 0, 500, &app->scene.yMargin, length, dim);
	gui->addSlider("Y Margin Bottom Offset", 0, 300, &app->scene.yMarginBottomOffset, length, dim);
	gui->addSlider("Line Length", 50, 500, &app->scene.lineLength, length, dim);
	gui->addSlider("Line Spacing", 0, 10, &app->scene.lineSpacing, length, dim);
	gui->addSlider("Text Size", 10, 100, &app->scene.textSize, length, dim);
	gui->addSlider("Value average amount", 2, 150, &app->scene.averageAmount, length, dim);
	
	gui->addSpacer(length, 1);
	gui->addSlider("Red", 0, 255, &app->scene.textColour[0], length, dim);
	gui->addSlider("Green", 0, 255, &app->scene.textColour[1], length, dim);
	gui->addSlider("Blue", 0, 255, &app->scene.textColour[2], length, dim);
	gui->addSlider("Alpha", 0, 255, &app->scene.textColour[3], length, dim);
	
	gui->addSpacer(length, 1);
    gui->addLabel("COLOUR KEY");
	gui->addSlider("Top Colour Box Y Offset", -300, 300, &app->scene.topColourBoxXOffset, length, dim);
	gui->addSlider("Bottom Colour Box Y Offset", -300, 300, &app->scene.bottomColourBoxXOffset, length, dim);
	gui->addSlider("Colour Box Thickness", 1, 50, &app->scene.colourBoxThickness, length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 2
0
void GUI::addGraphDesignGUI()
{
	string title = "GRAPH DESIGN";
    ofxUICanvas* gui = getNewGUI(title);
	
	gui->addToggle("Toggle Graph animation", &Graph::isAnimating, toggleDim, toggleDim);
	gui->addToggle("Toggle New Min/Max clear", &Graph::isClearOnNewMinMax, toggleDim, toggleDim);
	gui->addSpacer(length, 1);
	
	gui->addToggle("Toggle Draw Body", &Graph::isDrawBody, toggleDim, toggleDim);
	gui->addToggle("Toggle Draw Lines", &Graph::isDrawLines, toggleDim, toggleDim);
	gui->addToggle("Toggle Clamp Y Values", &Graph::isClampYValues, toggleDim, toggleDim);
	gui->addSlider("Graph Item X Gap", 0.1, 2, &Graph::graphItemXGap, length, dim);
	gui->addSlider("Graph z Range", 0, 200, &Graph::zRange, length, dim);
	gui->addSlider("Graph Width max", 1, 300, &Graph::maxGraphWidth, length, dim);
	gui->addSlider("Graph Height Max", 0, 100, &Graph::graphHeightMax, length, dim);
	gui->addSlider("Graph bottom end (percent)", 0, 20, &Graph::graphEndPercent, length, dim);
	gui->addSlider("Data send speed (seconds)", 0.01, 10, &app->dataManager.sendDataSpeed, length, dim);
	gui->addSlider("Line Thickness", 1, 20, &Graph::lineThickness, length, dim);

	gui->addLabel("GRID");
	gui->addSlider("Scale", 1, 200, &app->scene.gridScale, length, dim);
	gui->addSlider("Ticks", 1, 50, &app->scene.gridTicks, length, dim);
	gui->addSlider("Grid Red", 0, 255, &app->scene.gridCol[0], length, dim);
	gui->addSlider("Grid Green", 0, 255, &app->scene.gridCol[1], length, dim);
	gui->addSlider("Grid Blue", 0, 255, &app->scene.gridCol[2], length, dim);
	gui->addSlider("Grid Alpha", 0, 255, &app->scene.gridCol[3], length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 3
0
void GUI::addSeparateBodyGraphDesignGUI()
{
	string title = "SEPARATE BODY GRAPH DESIGN";
    ofxUICanvas* gui = getNewGUI(title);
	
	gui->addToggle("Toggle Draw Lines", &app->scene.separateBodyGraph.isDrawLines, toggleDim, toggleDim);
	gui->addSlider("Graph Item X Gap", 5, 50, &app->scene.separateBodyGraph.graphItemXGap, length, dim);
	gui->addSlider("Line width", 1, 50, &app->scene.separateBodyGraph.lineWidth, length, dim);
	gui->addSlider("Graph Height Max", 0, 1, &app->scene.separateBodyGraph.graphHeightMax, length, dim);
	gui->addSlider("Graph bottom end (percent)", 0, 2, &app->scene.separateBodyGraph.graphEndPercent, length, dim);
	gui->addSlider("Data send speed (seconds)", 0.1, 20, &app->scene.separateBodyGraph.sendDataSpeed, length, dim);
	
	gui->addSpacer(length, 1);
	gui->addSlider("Data0 red", 0, 255, &app->scene.separateBodyGraph.col0[0], length, dim);
	gui->addSlider("Data0 green", 0, 255, &app->scene.separateBodyGraph.col0[1], length, dim);
	gui->addSlider("Data0 blue", 0, 255, &app->scene.separateBodyGraph.col0[2], length, dim);
	gui->addSlider("Data0 alpha", 0, 255, &app->scene.separateBodyGraph.col0[3], length, dim);

	gui->addSpacer(length, 1);
	gui->addSlider("Data1 red", 0, 255, &app->scene.separateBodyGraph.col1[0], length, dim);
	gui->addSlider("Data1 green", 0, 255, &app->scene.separateBodyGraph.col1[1], length, dim);
	gui->addSlider("Data1 blue", 0, 255, &app->scene.separateBodyGraph.col1[2], length, dim);
	gui->addSlider("Data1 alpha", 0, 255, &app->scene.separateBodyGraph.col1[3], length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 4
0
void GUI::addGraphSimulationGUI()
{
	string title = "SIMULATION";
    ofxUICanvas* gui = getNewGUI(title);
	
    gui->addToggle("Toggle Data Simulation", &app->dataManager.isDataSimulated, toggleDim, toggleDim);
	gui->addSlider("Speed (data per frame)", 1, 60, &app->dataManager.simulationSpeed, length, dim);
	gui->addSlider("Perlin X Scale (data size)", 0.001, 0.5, &app->dataManager.perlinXScale, length, dim);
	gui->addSlider("Perlin Y Scale (time f)", 0.001, 0.5, &app->dataManager.perlinYScale, length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 5
0
void GUI::addKeyboardShortcutsGUI()
{
    string title = "KEYBOARD SHORTCUTS";
    ofxUICanvas* gui = getNewGUI(title);

    gui->addLabel("SPACE - SHOW/HIDE GUI", OFX_UI_FONT_SMALL);
    gui->addLabel("'[' - PREVIOUS GUI", OFX_UI_FONT_SMALL);
    gui->addLabel("']' - NEXT GUI", OFX_UI_FONT_SMALL);
    gui->addLabel("'p' - TOGGLE PAUSE ANIMATION", OFX_UI_FONT_SMALL);
    gui->addLabel("'f' - TOGGLE FULLSCREEN", OFX_UI_FONT_SMALL);
    gui->addLabel("'c' - CLEAR ALL GRAPH DATA", OFX_UI_FONT_SMALL);

    
    finaliseCanvas(gui, true);
}
Exemplo n.º 6
0
void GUI::addGraphColourGUI()
{
	string title = "GRAPH COLOUR";
    ofxUICanvas* gui = getNewGUI(title);
		
	gui->addLabel("COLOUR");
	gui->addSlider("Front red", 0, 255, &Graph::colFront[0], length, dim);
	gui->addSlider("Front green", 0, 255, &Graph::colFront[1], length, dim);
	gui->addSlider("Front blue", 0, 255, &Graph::colFront[2], length, dim);
	gui->addSlider("Front alpha", 0, 255, &Graph::colFront[3], length, dim);
	gui->addSlider("Back red", 0, 255, &Graph::colBack[0], length, dim);
	gui->addSlider("Back green", 0, 255, &Graph::colBack[1], length, dim);
	gui->addSlider("Back blue", 0, 255, &Graph::colBack[2], length, dim);
	gui->addSlider("Back alpha", 0, 255, &Graph::colBack[3], length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 7
0
void GUI::addVariousGUI()
{
    string title = "VARIOUS";
    ofxUICanvas* gui = getNewGUI(title);

    //gui->addLabel("GRID");
    //gui->addToggle("GRID VISIBLE", &app->scene.isGridVisible, toggleDim, toggleDim);
    //gui->addSlider("GRID ALPHA", 0, 255, &app->scene.gridAlpha, length, dim);
    
    gui->addLabel("GUI DESIGN");
    gui->addSlider("RED", 0, 255, 255, length, dim);
    gui->addSlider("GREEN", 0, 255, 1, length, dim);
    gui->addSlider("BLUE", 0, 255, 1, length, dim);
    gui->addSlider("ALPHA", 0, 255, 255, length, dim);
    
    ofAddListener(gui->newGUIEvent, this, &GUI::variousGUIEvent);
    finaliseCanvas(gui, true);
}
Exemplo n.º 8
0
void GUI::addLegendTextGUI()
{
	string title = "TITLE AND LEGEND TEXT";
    ofxUICanvas* gui = getNewGUI(title);
	
	gui->addLabel("TITLE");
	gui->addSlider("Scale", 0.1, 2, &app->scene.titleScale, length, dim);

	gui->addLabel("LEGEND");
	gui->addSlider("Size", 10, 100, &app->scene.legendTextSize, length, dim);
	gui->addSlider("Spacing", 0, 10, &app->scene.legendTextSpacing, length, dim);
	gui->addSlider("Line Length", 20, 1000, &app->scene.legendTextLineLength, length, dim);
	gui->addSlider("X", 0, 500, &app->scene.legendTextPoint.x, length, dim);
	gui->addSlider("Y", 0, 500, &app->scene.legendTextPoint.y, length, dim);
	

    finaliseCanvas(gui, true);
}
Exemplo n.º 9
0
void GUI::addKeyboardShortcutsGUI()
{
    string title = "KEYBOARD SHORTCUTS";
    ofxUICanvas* gui = getNewGUI(title);

    gui->addLabel("SPACE - SHOW/HIDE GUI", OFX_UI_FONT_SMALL);
    gui->addLabel("'[' - PREVIOUS GUI", OFX_UI_FONT_SMALL);
    gui->addLabel("']' - NEXT GUI", OFX_UI_FONT_SMALL);
    gui->addLabel("'p' - TOGGLE PAUSE ANIMATION", OFX_UI_FONT_SMALL);
    gui->addLabel("'f' - TOGGLE FULLSCREEN", OFX_UI_FONT_SMALL);
    gui->addLabel("'c' - CLEAR ALL GRAPH DATA", OFX_UI_FONT_SMALL);
    gui->addLabel("'t' - REDRAW TEXT FBOS", OFX_UI_FONT_SMALL);
    gui->addLabel("'o' - OUTPUT GRAPH DATA TO TXT", OFX_UI_FONT_SMALL);
    gui->addLabel("'1-3' - CHANGE CURRENT CAMERA", OFX_UI_FONT_SMALL);
    gui->addLabel("'a' - TOGGLE AUTO ROTATE CAM", OFX_UI_FONT_SMALL);

    
    finaliseCanvas(gui, true);
}
Exemplo n.º 10
0
void GUI::addGraphGlobalGUI()
{
	string title = "GRAPH GLOBAL";
    ofxUICanvas* gui = getNewGUI(title);
 //   gui->addLabel("GRAPH TEXT");
	
	gui->addSpacer(length, 1);
	gui->addSlider("Reconnect Frequency", 1000, 60000, &app->dataManager.reconnectFrequency, length, dim);


	//gui->addSpacer(length, 1);
	//gui->addSlider("Size", 5, 50, &app->scene.graphTextSize, length, dim);
	//gui->addSlider("Red", 0, 255, &app->scene.graphTextColour[0], length, dim);
	//gui->addSlider("Green", 0, 255, &app->scene.graphTextColour[1], length, dim);
	//gui->addSlider("Blue", 0, 255, &app->scene.graphTextColour[2], length, dim);
	//gui->addSlider("Alpha", 0, 255, &app->scene.graphTextColour[3], length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 11
0
void GUI::addGraphGlobalGUI()
{
	string title = "GRAPH GLOBAL";
    ofxUICanvas* gui = getNewGUI(title);

	vector<string> graphNames;
	graphNames.push_back("Bar graph");
	graphNames.push_back("Solid Body graph");
	graphNames.push_back("Separate Body graph");

	gui->addRadio("Graph Selection", graphNames, OFX_UI_ORIENTATION_VERTICAL, dim*2, dim*2);
	
	gui->addSpacer(length, 1);
	gui->addToggle("Toggle New Min/Max clear", &app->scene.isClearOnNewMinMax, toggleDim, toggleDim);

	gui->addSpacer(length, 1);
	gui->addRangeSlider("Graph X begin/end (percent)", 0, 1, &AbstractGraph::minGraphPercent, &AbstractGraph::maxGraphPercent, length, dim);
	
	gui->addSpacer(length, 1);
	gui->addSlider("Decimal points 0", 1, 10, &app->scene.valDecimalPoints0, length, dim);
	gui->addSlider("Decimal points 1", 1, 10, &app->scene.valDecimalPoints1, length, dim);

    gui->addLabel("GRAPH TEXT");
	gui->addSpacer(length, 1);
	gui->addSlider("Size", 5, 50, &app->scene.graphTextSize, length, dim);
	gui->addSlider("Red", 0, 255, &app->scene.graphTextColour[0], length, dim);
	gui->addSlider("Green", 0, 255, &app->scene.graphTextColour[1], length, dim);
	gui->addSlider("Blue", 0, 255, &app->scene.graphTextColour[2], length, dim);
	gui->addSlider("Alpha", 0, 255, &app->scene.graphTextColour[3], length, dim);
	gui->addSpacer(length, 1);
	gui->addSlider("Graph Text Rect Margin", 1, 30, &app->scene.hudTextRectMargin, length, dim);
	gui->addSlider("Graph Text RectRed", 0, 255, &app->scene.graphTextRectCol[0], length, dim);
	gui->addSlider("Graph Text RectGreen", 0, 255, &app->scene.graphTextRectCol[1], length, dim);
	gui->addSlider("Graph Text RectBlue", 0, 255, &app->scene.graphTextRectCol[2], length, dim);
	gui->addSlider("Graph Text RectAlpha", 0, 255, &app->scene.graphTextRectCol[3], length, dim);

	gui->addSpacer(length, 1);
	gui->addSlider("Reconnect Frequency", 1000, 60000, &app->dataManager.reconnectFrequency, length, dim);

    ofAddListener(gui->newGUIEvent, this, &GUI::graphGlobalGUIEvent);
    finaliseCanvas(gui, true);
}
Exemplo n.º 12
0
void GUI::addCameraGUI()
{
	string title = "CAMERA";
    ofxUICanvas* gui = getNewGUI(title);
	
    gui->addToggle("Rotation", &app->scene.isCamRotate, toggleDim, toggleDim);
    gui->addToggle("Auto Camera Swap", &app->scene.isCamAutoSwap, toggleDim, toggleDim);
	for (int i = 0; i < 3; i++)
	{
		gui->addLabel("CAMERA " + ofToString(i));
		gui->addSlider("Cam" + ofToString(i) + " Distance", 10, 200, &app->scene.cameras[i].distance, length, dim);
		gui->addSlider("Cam" + ofToString(i) + " Y", 1, 150, &app->scene.cameras[i].positionVec.y, length, dim);
		gui->addSlider("Cam" + ofToString(i) + " Direction Point Y", 0, 150, &app->scene.cameras[i].lookAtVec.y, length, dim);
		gui->addSlider("Cam" + ofToString(i) + " Rotation Speed", -2, 2, &app->scene.cameras[i].rotSpeed, length, dim);
		gui->addSlider("Cam" + ofToString(i) + " Swap Probablity (per frame)", 0.001, 0.1, &app->scene.cameras[i].swapProbability, length, dim);
		gui->addSlider("Cam" + ofToString(i) + " Min Seconds Before Swapping", 0.5, 10, &app->scene.cameras[i].minSecondsBeforeSwapping, length, dim);
	}

    finaliseCanvas(gui, true);
}
Exemplo n.º 13
0
void GUI::addGraphTextGUI()
{
	string title = "GRAPH TEXT";
    ofxUICanvas* gui = getNewGUI(title);
	
	//gui->addToggle("Toggle Draw Lines", &Graph::isDrawLines, toggleDim, toggleDim);
	gui->addSlider("Line Width", 10, 150, &Graph::lineLength, length, dim);
	gui->addSlider("Line Spacing", 10, 50, &Graph::lineSpacing, length, dim);
	gui->addSlider("Text Size", 10, 100, &Graph::textSize, length, dim);
	gui->addSlider("Text Fbo Width", 10, 200, &Graph::fboW, length, dim);
	gui->addSlider("Text Fbo Height", 10, 100, &Graph::fboH, length, dim);
	gui->addSlider("Text Draw Y", 0, 100, &Graph::textY, length, dim);
	gui->addSlider("Text X", -200, 200, &Graph::textPnt.x, length, dim);
	gui->addSlider("Text Y", -200, 200, &Graph::textPnt.y, length, dim);
	gui->addSlider("Text z Offset", -50, 50, &Graph::graphTextZOffset, length, dim);

	gui->addWidgetDown(new ofxUILabelButton(false, "UPDATE TEXT", OFX_UI_FONT_MEDIUM)); 
	
    ofAddListener(gui->newGUIEvent, this, &GUI::graphTextGUIEvent);
    finaliseCanvas(gui, true);
}
Exemplo n.º 14
0
void GUI::addHUDGUI()
{
    string title = "HUD";
    ofxUICanvas* gui = getNewGUI(title);

	gui->addSpacer(length, 1);
    gui->addLabel("HUD BACKGROUND SETTINGS");
	gui->addSlider("Red .", 0, 255, &app->scene.hudColour[0], length, dim);
	gui->addSlider("Green .", 0, 255, &app->scene.hudColour[1], length, dim);
	gui->addSlider("Blue .", 0, 255, &app->scene.hudColour[2], length, dim);
	gui->addSlider("Alpha .", 0, 255, &app->scene.hudColour[3], length, dim);
	gui->addSlider("Hole Width Percent", 0, 2, &app->scene.hudHoleWidthPercentage, length, dim);
	gui->addSlider("Hole Height Percent", 0, 2, &app->scene.hudHoleHeightPercentage, length, dim);
	gui->addSlider("Circle Point Size", 0, 100, &app->scene.circlePointSize, length, dim);
    gui->addLabel("CROSSHAIRS SETTINGS");
	gui->addSlider("Line Width", 0, 10, &app->scene.crosshairLineWidth, length, dim);
	gui->addSlider("Alpha ..", 0, 255, &app->scene.crosshairAlpha, length, dim);
	gui->addSlider("Circle Size", 0, 100, &app->scene.crosshairCircleSize, length, dim);
	gui->addSlider("Vertical line size (percent)", 0, 1, &app->scene.crosshairVertScale, length, dim);
	gui->addSlider("Horizontal line size (percent)", 0, 1, &app->scene.crosshairHorizScale, length, dim);

    finaliseCanvas(gui, true);
}
Exemplo n.º 15
0
void GUI::addVideoGUI()
{
    string title = "VIDEO";
    ofxUICanvas* gui = getNewGUI(title);

	gui->addToggle("Toggle Video Visibility", &app->scene.isVideoVisible, toggleDim, toggleDim);
	gui->addToggle("Toggle Image Visibility", &app->scene.isImageVisible, toggleDim, toggleDim);
	gui->addSlider("Video/Image Width Percent", 0, 2, &app->scene.videoWidthPercentage, length, dim);
	gui->addSlider("Video/Image Height Percent", 0, 2, &app->scene.videoHeightPercentage, length, dim);

	

    gui->addLabel("VIDEO IMAGE SETTINGS");
	gui->addSlider("Brightness", 0, 2, &app->scene.brightness, length, dim);
	gui->addSlider("Contrast", 0, 2, &app->scene.contrast, length, dim);
	gui->addSlider("Saturation", 0, 2, &app->scene.saturation, length, dim);
	gui->addSlider("Red", 0, 2, &app->scene.red, length, dim);
	gui->addSlider("Green", 0, 2, &app->scene.green, length, dim);
	gui->addSlider("Blue", 0, 2, &app->scene.blue, length, dim);
	gui->addSlider("Alpha", 0, 2, &app->scene.alpha, length, dim);
	
    finaliseCanvas(gui, true);
}
Exemplo n.º 16
0
void GUIManager::buildSideBarGUI()
{
	sideBarGui = new ofxUICanvas(canvasW, 0, sidebarLength, 146);
    sideBarGui->setColorBack(colorBack);
    
	sideBarGui->setName(SIDE_TITLE);
//    sideBarGui->setFont(guiPath + "/NewMedia Fett.ttf");
    
	sideBarGui->addWidgetRight(new ofxUIFPS(OFX_UI_FONT_MEDIUM));
    
#ifdef TARGET_OSX
    sideBarGui->setGlobalButtonDimension(45);
#endif

#ifdef TARGET_OSX
    sideBarGui->addImageToggle(SIDE_AUTO_SAVE, "GUI/images/auto_save_image.png", true);
#else
	sideBarGui->addWidgetDown(new ofxUILabelToggle(true, SIDE_AUTO_SAVE));
#endif

	sideBarGui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT);
    
#ifdef TARGET_OSX
    sideBarGui->addImageButton(SIDE_SAVE, "GUI/images/save_image.png", false);
#else
	sideBarGui->addWidgetRight(new ofxUILabelButton(false, SIDE_SAVE));
#endif

    sideBarGui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN);
    
    sideBarGui->addSpacer(length * 0.5, 1);

    sideBarGui->autoSizeToFitWidgets();
    
	ofAddListener(sideBarGui->newGUIEvent, this, &GUIManager::sideBarGUIEvent);
	finaliseCanvas(sideBarGui, true);
}
Exemplo n.º 17
0
void GUI::addBarGraphDesignGUI()
{
	string title = "BAR GRAPH DESIGN";
    ofxUICanvas* gui = getNewGUI(title);
	
	gui->addSlider("Graph Item X Gap", 5, 50, &app->scene.barGraph.graphItemXGap, length, dim);
	gui->addSlider("BarWidth", 2, 50, &app->scene.barGraph.barWidth, length, dim);
	gui->addSlider("Graph Height Max", 0, 1, &app->scene.barGraph.graphHeightMax, length, dim);
	gui->addSlider("Data send speed (seconds)", 0.1, 20, &app->scene.barGraph.sendDataSpeed, length, dim);
	
	gui->addSpacer(length, 1);
	gui->addSlider("Data0 red", 0, 255, &app->scene.barGraph.col0[0], length, dim);
	gui->addSlider("Data0 green", 0, 255, &app->scene.barGraph.col0[1], length, dim);
	gui->addSlider("Data0 blue", 0, 255, &app->scene.barGraph.col0[2], length, dim);
	gui->addSlider("Data0 alpha", 0, 255, &app->scene.barGraph.col0[3], length, dim);

	gui->addSpacer(length, 1);
	gui->addSlider("Data1 red", 0, 255, &app->scene.barGraph.col1[0], length, dim);
	gui->addSlider("Data1 green", 0, 255, &app->scene.barGraph.col1[1], length, dim);
	gui->addSlider("Data1 blue", 0, 255, &app->scene.barGraph.col1[2], length, dim);
	gui->addSlider("Data1 alpha", 0, 255, &app->scene.barGraph.col1[3], length, dim);

    finaliseCanvas(gui, true);
}