KeyMap::KeyMap(const sf::Texture& buttonTex, int xpos, int ypos,int x_frames, int y_frames, int spool)
{
    oneclick = false;
    toggled = false;
    clicked = false;
    hover = false;
    animInit(buttonTex,xpos,ypos,x_frames,y_frames,spool);
}
Example #2
0
int main(int argc, char **argv) {

#ifdef COREDUMP
#ifndef WIN32
	struct rlimit rlim;
	getrlimit(RLIMIT_CORE, &rlim);
	rlim.rlim_cur=rlim.rlim_max;
	setrlimit(RLIMIT_CORE, &rlim);
#endif
#endif

	char *path;
	FILE *file;

	srand(time(0));
	glutInit(&argc, argv);
	glutInitWindowSize(1024, 768);
	glutInitDisplayMode(GLUT_MULTISAMPLE|GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH);
	glutCreateWindow("Geometric figures");
	hidInit();
	consoleInit();
	figureInit();
	drawerInit();
	animInit();
	scriptInit();


	glutDisplayFunc(drawerDisplay);
	glutReshapeFunc(drawerResize);
	glutKeyboardFunc(mainKeyPress);
	glutSpecialFunc(mainSpecialKeyPress);
	glutKeyboardUpFunc(mainKeyRelease);
	glutSpecialUpFunc(mainSpecialKeyRelease);
	glutMouseFunc(mainMouseEvent);
	glutMotionFunc(mainMouseMoveEvent);

	consolePrintNamedBlock("help", "welcome");
	path=utilExpandPath("%/config.py");
	if ((file=fopen(path, "r"))) {
		fclose(file);
		consoleExecFile(path);
	}

	for (int i=1; i<argc; i++) {
		consoleExecFile(argv[i]);
	}

	glutMainLoop();

	drawerFree();
	scriptFinalize();

	return 0;
}