PDA

View Full Version : Title Screen



Gleanx
06-17-2017, 03:10 AM
Hi,

I am making a little spaceship videogame for a project and I would like to add to the program a title screen before the game starts. But I don't know how to "put" in the window a 2D picture and then choose with the mouse what the user wants to do. For example:

https://c1.staticflickr.com/1/168/368744053_3e1750aa1a.jpg

My main funciton code is:



int main(int argc, char** argv) {

confi();
//Definicion de OPEN_GL
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowSize(720, 480);
glutInitWindowPosition(100, 100);
glutCreateWindow("Motor 3D");
//glutFullScreen();


init();
glutDisplayFunc(displayMe);
glutIdleFunc(idle);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyPressed);
glutMouseFunc(onMouse);
glutMotionFunc(onMotion);
glutMainLoop();
return 0;
}


where confi is used for modify the objects and then be updated in glutFunctions. In order to make the tittle screen game, should I use a glutFunction that I don't know yet or maybe I must create a new funcion by me?

Thanks in advance.