Exemplo n.º 1
0
void TPinterface::initGUI() {
	// Check CGFinterface.h and GLUI documentation for the types of controls available
	GLUI_Panel *varPanel = addPanel("Lights", 1);

	// You could also pass a reference to a variable from the scene class, if public

	addCheckboxToPanel(varPanel, "light0", &on0, 0);
	addCheckboxToPanel(varPanel, "light1", &on1, 1);
	addCheckboxToPanel(varPanel, "light2", &on2, 2);
	addCheckboxToPanel(varPanel, "light3", &on3, 3);
	addCheckboxToPanel(varPanel, "light4", &on4, 4);

	addButtonToPanel(varPanel, "Clock", 5);


	GLUI_RadioGroup* wireframeGroup = addRadioGroupToPanel(varPanel,&radioStatus, 6);

	addRadioButtonToGroup(wireframeGroup, "Textured");
	addRadioButtonToGroup(wireframeGroup, "Wireframed");



	GLUI_Listbox* listBox = addListboxToPanel(varPanel,"Textures",&listStatus, 7);

	listBox->add_item(0, "Default");
	listBox->add_item(1, "Earth");

}
Exemplo n.º 2
0
void TPinterface::initGUI()
{
	// Check CGFinterface.h and GLUI documentation for the types of controls available
	//GLUI_Panel *varPanel= addPanel("Group", 1);
	//addSpinnerToPanel(varPanel, "Val 1(interface)", 2, &testVar, 1);

	// You could also pass a reference to a variable from the scene class, if public
	//addSpinnerToPanel(varPanel, "Val 2(scene)", 2, &(((LightingScene*) scene)->sceneVar), 2);
	//addColumn ();
	GLUI_Panel *varLuz= addPanel("Luzes", 2);
	addCheckboxToPanel(varLuz, "Luz 1",&((LightingScene *) scene)->state1,NULL);
	addCheckboxToPanel(varLuz, "Luz 2",&((LightingScene *) scene)->state2,NULL);
	addCheckboxToPanel(varLuz, "Luz 3",&((LightingScene *) scene)->state3,NULL);
	addCheckboxToPanel(varLuz, "Luz 4",&((LightingScene *) scene)->state4,NULL);
	addColumn ();
	GLUI_Panel *varClock= addPanel("Relogio", 3);
	addStaticText("Relógio");
	addButton ("Pause/Start",1);
	addColumn ();
	GLUI_Panel *vartext= addPanel("Texturas",4);
	GLUI_Listbox *textvar =addListboxToPanel(vartext,"Texturas",&((LightingScene *) scene)->statetext,NULL);
	textvar->add_item (1, "Default");
	textvar->add_item (2, "Sky");
	textvar->add_item (3, "Space");
	textvar->set_int_val (3); 
	addColumn();
	GLUI_Panel *varwire= addPanel("Wireframe",5);
	GLUI_RadioGroup *group=addRadioGroupToPanel(varwire,&((LightingScene *) scene)->wire);
	addRadioButtonToGroup(group,"Normal");
	addRadioButtonToGroup(group,"Wireframe");
	addColumn();
}
Exemplo n.º 3
0
void TPinterface::initGUI()
{

	pgraph = &(((LightingScene*) scene)->pgraph);

	int* wire = &(((LightingScene*) scene)->wire);

	int* wind = &(((LightingScene*) scene)->wind);

	int * cam = &(((LightingScene*) scene)->activCam);

	// Check CGFinterface.h and GLUI documentation for the types of controls available
	GLUI_Panel *varPanel= addPanel("Settings:", 1);


	GLUI_Panel *modepanel = addPanelToPanel(varPanel, "Mode", 1);
	GLUI_RadioGroup* wireFrameGroup = addRadioGroupToPanel(modepanel,wire);
	addRadioButtonToGroup(wireFrameGroup, "\tFill");
	addRadioButtonToGroup(wireFrameGroup, "\tWire");
	addRadioButtonToGroup(wireFrameGroup, "\tPoint");
	
	addColumnToPanel(varPanel);
	GLUI_Panel *cammodel = addPanelToPanel(varPanel, "Camera", 1);
	GLUI_RadioGroup* camerasGroup = addRadioGroupToPanel(cammodel,cam);
	for(int i = 0; i < cameras.size();i++)
	{

		addRadioButtonToGroup(camerasGroup, (char *)cameras[i].c_str());
	}
	addRadioButtonToGroup(camerasGroup, "Free Camera");
	

	addColumnToPanel(varPanel);
	GLUI_Panel *lightspanel = addPanelToPanel(varPanel, "Lights", 1);
	for(int i = 0; i < pgraph->getLights().size();i++)
	{
		if (pgraph->getLights()[i].enabled)
			addCheckboxToPanel(lightspanel,
			(char*)pgraph->getLights()[i].id.c_str(), NULL, i)->set_int_val(
			1);
		else
			addCheckboxToPanel(lightspanel,
			(char*)pgraph->getLights()[i].id.c_str(), NULL, i)->set_int_val(
			0);
	}

	addColumnToPanel(varPanel);
	GLUI_Panel *windpanel = addPanelToPanel(varPanel, "Wind", 1);
	GLUI_Spinner *spin=   addSpinnerToPanel(windpanel,"wind",GLUI_SPINNER_INT,wind,11);

	spin->set_int_limits(0,11,GLUI_LIMIT_WRAP);	

}
Exemplo n.º 4
0
void TPinterface::initGUI()
{
	GLUI_Panel *lights= addPanel("Luzes", 1);
	addCheckboxToPanel(lights,"Light0", NULL,100)->set_int_val(1);
	addCheckboxToPanel(lights,"Light1", NULL,101)->set_int_val(1);
	addCheckboxToPanel(lights,"Light2", NULL,102)->set_int_val(1);
	addCheckboxToPanel(lights,"Light3", NULL,103)->set_int_val(1);

	GLUI_Panel *clock= addPanel("Clock", 1);
	clockbt=addButtonToPanel(clock,"Stop",104);
	

}
Exemplo n.º 5
0
void Interface::initGUI()
{
	Scene * scene = ((Scene *)this->scene);
	std::vector<Light *> sceneLights = scene->getLights();
	lightsState = new int[sceneLights.size()];

	GLUI_Panel * panelLights = addPanel("Lights: ", 1);
	int * lightvalue;
	unsigned i = 0;
	for(std::vector<Light *>::iterator it = sceneLights.begin(); it != sceneLights.end() ;it++,i++){
		lights.push_back(*it);
		lightsState[i] = ((*it)->isEnabled() ? 1 : 0);
		addCheckboxToPanel (panelLights,(char *)((*it)->getIdTitle()).c_str(),&lightsState[i], i + LIGHTS_BASE_ID);
	}

	
	addColumn();

	activeCameraPosition = scene->getActiveCameraPosition();

	GLUI_Panel * cameraPanel = addPanel("Cameras: ", 1);
	GLUI_RadioGroup * rgCameras = addRadioGroupToPanel(cameraPanel,&activeCameraPosition, CAMERAS_ID);
	
	std::vector<Camera *> cameras = scene->getCameras();

	unsigned size = i + cameras.size();
	std::vector<Camera *>::iterator it = cameras.begin();	
	for(; it != cameras.end() ;it++){
		addRadioButtonToGroup (rgCameras, (char *)(*it)->getTitle().c_str());
	}

	addColumn();

	drawingMode = scene->getDrawingMode(); 

	GLUI_Panel * drawingModePanel = addPanel("Drawing mode: ", 1);
	GLUI_RadioGroup * rgDrawingMode = addRadioGroupToPanel(drawingModePanel,&drawingMode, DRAWINGMODE_ID);
	addRadioButtonToGroup (rgDrawingMode, "Fill");
	addRadioButtonToGroup (rgDrawingMode, "Line");
	addRadioButtonToGroup (rgDrawingMode, "Point");
	
	addColumn();

	shaddingMode = scene->getShaddingMode(); 

	GLUI_Panel * shaddingModePanel = addPanel("Shadding mode: ", 1);
	GLUI_RadioGroup * rgShaddingMode = addRadioGroupToPanel(shaddingModePanel,&shaddingMode, SHADDINGMODE_ID);
	addRadioButtonToGroup (rgShaddingMode, "Flat");
	addRadioButtonToGroup (rgShaddingMode, "Gouraud");
	
	addColumn();
	
	GLUI_Panel * axisModePanel = addPanel("Axis: ", 1);
	GLUI_RadioGroup * rgAxisMode = addRadioGroupToPanel(axisModePanel,&scene->showAxis, SHOWAXIS_ID);
	addRadioButtonToGroup (rgAxisMode, "Show");
	addRadioButtonToGroup (rgAxisMode, "Hide");
	
}
Exemplo n.º 6
0
void TPinterface::initGUI() {

	// Check CGFinterface.h and GLUI documentation for the types of controls available
	GLUI_Panel *varPanel1 = addPanel("LIGHTS", 1);
	addColumn();
	GLUI_Panel *varPanel2 = addPanel("CLOCK", 1);
	addColumn();
	GLUI_Panel *varPanel3 = addPanel("Robot Textures", 1);
	addColumn();
	GLUI_Panel *varPanel4 = addPanel("Robot Mode", 1);

	//light0
	addCheckboxToPanel(varPanel1, "light 0", &l0en, 1); 
	//light1
	addCheckboxToPanel(varPanel1, "light 1", &l1en, 2);
	//light2
	addCheckboxToPanel(varPanel1, "light 2", &l2en, 3);
	//light3
	addCheckboxToPanel(varPanel1, "light 3", &l3en, 4);

/*
	//Clock
	addButtonToPanel(varPanel2, "Pause/Restart", 5); 

	//Textures listbox
	GLUI_Listbox *listbox = addListboxToPanel(varPanel3, "Textures ", &robotText, 6);

	listbox->add_item(0, "Basic");
	listbox->add_item(1, "Serpentine");
	listbox->add_item(2, "Aco");
	listbox->add_item(3, "Robot");

	//Texture and wireframe

	GLUI_RadioGroup *rButton = addRadioGroupToPanel(varPanel4, &robotMode, 7);
	addRadioButtonToGroup(rButton, "Textured");
	addRadioButtonToGroup(rButton, "Wireframe");*/

}
Exemplo n.º 7
0
void TPinterface::initGUI()
{
	GLUI_Panel *lightPanel= addPanel("Lights",1);
	for(unsigned int i=0;i<((LightingScene*) scene)->lightState.size();i++){
		char name[30]="";
		std::string s = ((LightingScene*) scene)->lights[i]->getID();
		sprintf(name, "%s", s.c_str());
		addCheckboxToPanel(lightPanel,name,&(((LightingScene*) scene)->lightState[i]),0);
	}

	addColumn();

	GLUI_Panel *cameraPanel= addPanel("Cameras",1);
	if(((LightingScene*) scene)->cameras.size()<5){
		GLUI_RadioGroup *radioCameras=addRadioGroupToPanel(cameraPanel,&((LightingScene*) scene)->camera,1);
		for(unsigned int i=0;i<((LightingScene*) scene)->cameras.size();i++){
			char name[30]="";
			std::string s =((LightingScene*) scene)->cameras[i]->getID();
			sprintf(name, "%s", s.c_str());
			addRadioButtonToGroup(radioCameras,name);
		}
	}
	else{
		GLUI_Listbox *listbox = addListboxToPanel(cameraPanel,"Cameras",&((LightingScene*) scene)->camera,2);

		for(unsigned int i=0;i<2;i++){
			char name[30]="";
			std::string s =((LightingScene*) scene)->cameras[i]->getID();
			sprintf(name, "%s", s.c_str());
			listbox->add_item(i,name);
			((LightingScene*) scene)->camera= listbox->get_int_val();
		}
	}

	addColumn();

	GLUI_Panel *drawmodePanel= addPanel("Drawmode",1);
	GLUI_RadioGroup *radioDrawmode=addRadioGroupToPanel(drawmodePanel,&((LightingScene*) scene)->drawmode,3);
	addRadioButtonToGroup(radioDrawmode,"Point");
	addRadioButtonToGroup(radioDrawmode,"Line");
	addRadioButtonToGroup(radioDrawmode,"Fill");

	addColumn();

	GLUI_Panel *themesPanel= addPanel("Themes",1);
	GLUI_Listbox *themeslistbox = addListboxToPanel(themesPanel,"Themes",&((LightingScene*) scene)->app,4);
	themeslistbox->add_item(0, "classic");
	themeslistbox->add_item(1, "mario");
	themeslistbox->add_item(2, "dragon ball");
	themeslistbox->add_item(3, "angry birds");
}
Exemplo n.º 8
0
void GraphSceneUI::initLightsPanel() {
	char* text = new char[256];

	strcpy(text, "Lights");
	GLUI_Panel* lightsPanel = addPanel(text);

	vector<Light*>* lights = ((GraphScene*) scene)->getLights()->getLights();

	for (unsigned int i = 0; i < lights->size(); i++) {
		Light* light = (*lights)[i];

		strcpy(text, light->getStrID().c_str());
		addCheckboxToPanel(lightsPanel, text, light->getEnabled());
	}
}
Exemplo n.º 9
0
void DemoInterface::initGUI()
{
	// Check CGFinterface.h and GLUI documentation for the types of controls available
	GLUI_Panel *varPanel= addPanel("Teapot Shader", 1);
	addSpinnerToPanel(varPanel, "normScale", 2,NULL, 1);
	
	addColumn();

	varPanel= addPanel("Display List", 1);
	addCheckboxToPanel(varPanel, "Use", &(((DemoScene*) scene)->myDLObj->usingDL), 2);

	addColumn();
	
	varPanel= addPanel("Animations", 1);
	addButtonToPanel(varPanel, "Reset", 3);

	addColumn();

	addCheckbox( "Wireframe", &(((DemoScene*) scene)->wireframe), 4);
}
Exemplo n.º 10
0
void Interface::initGUI()
{
	GLUI_Panel *geral =addPanel("Opcoes", 1);
	addColumnToPanel(geral);
	GLUI_Panel *luzesPanel = addPanelToPanel(geral,"Luzes", 1);

	for(unsigned int i=0;i<((ANFScene *) scene)->parser.lights.size();i++){

		string str=((ANFScene *) scene)->parser.lights[i]->id;
		char * writable = new char[str.size() + 1];
		copy(str.begin(), str.end(), writable);
		writable[str.size()] = '\0';


		if(((ANFScene *) scene)->parser.lights[i]->enabled==true){
			addCheckboxToPanel(luzesPanel,writable,NULL,i)->set_int_val(1);
		}
		else{
			addCheckboxToPanel(luzesPanel,writable,NULL,i)->set_int_val(0);
		}
		delete[] writable;

	}

	addColumnToPanel(geral);
	GLUI_Panel *camerasPanel = addPanelToPanel(geral,"Camaras", 1);
	GLUI_RadioGroup *cameraList = addRadioGroupToPanel(camerasPanel,&(((ANFScene *) scene)->parser.activeCam));
	
	for(unsigned int i=0;i<((ANFScene *) scene)->parser.cameras.size();i++){

		string str=((ANFScene *) scene)->parser.cameras[i]->id;
		char * writable = new char[str.size() + 1];
		copy(str.begin(), str.end(), writable);
		writable[str.size()] = '\0';

		if(i == ((ANFScene *) scene)->parser.activeCam)
			addRadioButtonToGroup(cameraList, writable)->set_int_val(1);
		else
			addRadioButtonToGroup(cameraList, writable);

		delete[] writable;

	}
	addRadioButtonToGroup(cameraList, "Default");

	addColumnToPanel(geral);
	GLUI_Panel *drawPanel = addPanelToPanel(geral,"Draw Mode", 1);
	GLUI_RadioGroup *drawList = addRadioGroupToPanel(drawPanel,&(((ANFScene *) scene)->parser.globals->drawing.mode));
	addRadioButtonToGroup(drawList, "Fill");
	addRadioButtonToGroup(drawList, "Line");
	addRadioButtonToGroup(drawList, "Point");

	addColumnToPanel(geral);
	GLUI_Panel *windPanel = addPanelToPanel(geral,"Wind Value", 1);

	GLUI_Spinner *spinner = addSpinnerToPanel(windPanel, "windScale",GLUI_SPINNER_INT,&(((ANFScene *) scene)->parser.wind),9);
	
	spinner->set_speed(0.5);
	spinner->set_int_limits(0,10,GLUI_LIMIT_WRAP);

	
	GLUI_Panel *varPanel= addPanelToPanel(geral,"Animations", 1);
	addButtonToPanel(varPanel, "Reset", 8);
}
Exemplo n.º 11
0
void myInterface::initGUI()
{
	this->lights_number = ((myScene*) scene)->lights_vec.size();
	lightsPanel= addPanel("Lights", 1);

	switch(lights_number)
	{
	case 1: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | not defined",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | not defined",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | not defined",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | not defined",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | not defined",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | not defined",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);
		break;
	case 2: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | not defined",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | not defined",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | not defined",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | not defined",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | not defined",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);
		break;
	case 3: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | click to change default status",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | not defined",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | not defined",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | not defined",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | not defined",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);
		break;
	case 4: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | click to change default status",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | click to change default status",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | not defined",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | not defined",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | not defined",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);
		break;
	case 5: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | click to change default status",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | click to change default status",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | click to change default status",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | not defined",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | not defined",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);
		break;
	case 6: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | click to change default status",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | click to change default status",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | click to change default status",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | click to change default status",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | not defined",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);
		break;
	case 7: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | click to change default status",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | click to change default status",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | click to change default status",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | click to change default status",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | click to change default status",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | not defined",0,7);


		break;
	case 8: light0 = addCheckboxToPanel(lightsPanel,"Light0 | click to change default status",0,0);
		light1 = addCheckboxToPanel(lightsPanel,"Light1 | click to change default status",0,1);
		light2 = addCheckboxToPanel(lightsPanel,"Light2 | click to change default status",0,2);
		light3 = addCheckboxToPanel(lightsPanel,"Light3 | click to change default status",0,3);
		light4 = addCheckboxToPanel(lightsPanel,"Light4 | click to change default status",0,4);
		light5 = addCheckboxToPanel(lightsPanel,"Light5 | click to change default status",0,5);
		light6 = addCheckboxToPanel(lightsPanel,"Light6 | click to change default status",0,6);
		light7 = addCheckboxToPanel(lightsPanel,"Light7 | click to change default status",0,7);
		break;
	default: break;
	}

	/////////////////////
	addColumn();
	/////////////////////
	/*
	this->cameras_number = ((myScene*) scene)->cameras_vec.size(); 
	camerasPanel= addPanel("Cameras", 1);

	switch(lights_number)
	{
	case 1:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | not defined",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | not defined",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | not defined",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | not defined",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | not defined",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | not defined",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 2:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | not defined",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | not defined",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | not defined",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | not defined",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | not defined",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 3:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | click to change default status",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | not defined",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | not defined",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | not defined",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | not defined",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 4:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | click to change default status",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | click to change default status",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | not defined",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | not defined",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | not defined",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 5:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | click to change default status",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | click to change default status",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | click to change default status",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | not defined",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | not defined",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 6:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | click to change default status",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | click to change default status",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | click to change default status",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | click to change default status",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | not defined",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 7:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | click to change default status",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | click to change default status",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | click to change default status",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | click to change default status",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | click to change default status",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | not defined",0,7);
		break;
	case 8:
		camera0 = addCheckboxToPanel(camerasPanel,"Camera0 | click to change default status",0,0);
		camera1 = addCheckboxToPanel(camerasPanel,"Camera1 | click to change default status",0,1);
		camera2 = addCheckboxToPanel(camerasPanel,"Camera2 | click to change default status",0,2);
		camera3 = addCheckboxToPanel(camerasPanel,"Camera3 | click to change default status",0,3);
		camera4 = addCheckboxToPanel(camerasPanel,"Camera4 | click to change default status",0,4);
		camera5 = addCheckboxToPanel(camerasPanel,"Camera5 | click to change default status",0,5);
		camera6 = addCheckboxToPanel(camerasPanel,"Camera6 | click to change default status",0,6);
		camera7 = addCheckboxToPanel(camerasPanel,"Camera7 | click to change default status",0,7);
		break;
	default: break;
	} */
}
void DemoInterface::initGUI()
{
	this->pieceSelected=false;
	scorep1=0;
	scorep2=0;
	glutReshapeWindow(680,550);
	GLUI_Panel *masterPanel=addPanel("Interface",GLUI_PANEL_RAISED);
	addStaticTextToPanel(masterPanel,"Interface");
	int atual=2;
	GLUI_Panel *globalPanel= addPanelToPanel(masterPanel,"Globals", 1);
	GLUI_RadioGroup * g1 = addRadioGroupToPanel(globalPanel,&(((DemoScene *) scene)->drawMode),1);
	addRadioButtonToGroup(g1,"Fill");
	addRadioButtonToGroup(g1,"Wireframe");
	addRadioButtonToGroup(g1,"Point");

	addColumnToPanel(masterPanel);
	addStaticTextToPanel(masterPanel,"");
	GLUI_Panel *cameraPanel= addPanelToPanel(masterPanel,"Cameras",1);
	GLUI_RadioGroup * g2 = addRadioGroupToPanel(cameraPanel,&(((DemoScene*) scene)->activeCameraNumber),atual);
	atual++;
	map<string,Camera *>::const_iterator it;

	for(it=((DemoScene*) scene)->cameras.begin();it!=((DemoScene*) scene)->cameras.end();it++){
		addRadioButtonToGroup(g2,(char*)it->second->id.c_str());
	}

	addColumnToPanel(masterPanel);
	addStaticTextToPanel(masterPanel,"");
	GLUI_Panel *lighPanel=addPanelToPanel(masterPanel,"Lights",1);
	for(unsigned int i=0;i<((DemoScene *) scene)->graphLights.size();i++){
		addCheckboxToPanel(lighPanel,(char*)((DemoScene *) scene)->graphLights.at(i)->id.c_str(),(int *)&((DemoScene *) scene)->graphLights.at(i)->state,atual);
	}
	atual++;

	atual++;
	addColumnToPanel(masterPanel);
	GLUI_Panel * ambientPanel=addPanelToPanel(masterPanel,"Game Ambient",1);
	GLUI_RadioGroup * amb=addRadioGroupToPanel(ambientPanel,&((DemoScene *) scene)->theme,atual);
	atual++;
	addRadioButtonToGroup(amb,"Wood");
	addRadioButtonToGroup(amb,"Mineral");
	addRadioButtonToGroup(amb,"Aquatic");




	GLUI_Panel * gameTimePanel = addPanel("Game Time",GLUI_PANEL_EMBOSSED);
	GLUI_Panel * timePanel = addPanelToPanel(gameTimePanel,"Game Time",1);
	GLUI_EditText * time = addEditTextToPanel(timePanel,"Current Game Time", &((DemoScene *) scene)->gameTime,1);

	GLUI_Panel * gamePanel = addPanel("Game Status",GLUI_PANEL_EMBOSSED);
	GLUI_Panel * statusPanel = addPanelToPanel(gamePanel,"Game Status",1);
	gameStatus = addStaticTextToPanel(statusPanel,"Game Status");
	char c[128];
	sprintf(c, "Current player: %d | Game score: %d - %d \n ", &((DemoScene *) scene)->player,scorep1,scorep2);
	gameStatus->set_text(c);
	addColumnToPanel(gamePanel);


	GLUI_Panel * difPanel = addPanelToPanel(gamePanel,"Game Difficulty",1);
	GLUI_RadioGroup * dif=addRadioGroupToPanel(difPanel,0,atual);
	atual++;
	addRadioButtonToGroup(dif,"Easy");
	addRadioButtonToGroup(dif,"Medium");
	addRadioButtonToGroup(dif,"Hard");	


	addColumnToPanel(gamePanel);
	GLUI_Panel * modePanel = addPanelToPanel(gamePanel,"Game Mode",1);
	GLUI_RadioGroup * mode=addRadioGroupToPanel(modePanel,&((DemoScene *) scene)->gameMode,atual);
	atual++,
	addRadioButtonToGroup(mode,"Hum vs. Hum");
	addRadioButtonToGroup(mode,"Hum vs. CPU");
	addRadioButtonToGroup(mode,"CPU vs. CPU");



	addColumnToPanel(gamePanel);
	GLUI_Panel * buttonPanel = addPanelToPanel(gamePanel,"");
	GLUI_Button * undoButton=addButtonToPanel(buttonPanel,"Undo Move",atual);
	atual++;
	GLUI_Button * replayButton=addButtonToPanel(buttonPanel,"Replay last game",atual);
	atual++;
	GLUI_Button * startButton=addButtonToPanel(buttonPanel,"Start Game",atual);
	atual++;

}