1
0
Fork 0
mirror of https://codeberg.org/kbruen/y3s2-gui-project.git synced 2025-02-22 17:19:37 +02:00

Added esc to quit on No Maze screen

This commit is contained in:
Kenneth Bruen 2022-06-05 14:11:46 +03:00
parent 429fe9e60b
commit 011b57f051
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1
3 changed files with 8 additions and 1 deletions

View file

@ -20,3 +20,9 @@ void NoMazeScreen::display() {
glFlush(); glFlush();
glutSwapBuffers(); glutSwapBuffers();
} }
void NoMazeScreen::keyboard(unsigned char key, int x, int y) {
if (key == '\e') {
exit(EXIT_SUCCESS);
}
}

View file

@ -4,4 +4,5 @@
struct NoMazeScreen : public GlutEvents { struct NoMazeScreen : public GlutEvents {
virtual void display(); virtual void display();
virtual void keyboard(unsigned char key, int x, int y);
}; };

View file

@ -1,5 +1,5 @@
Name: y3s2-gui-project Name: y3s2-gui-project
Version: 1.0.5 Version: 1.0.6
Release: 1%{?dist} Release: 1%{?dist}
Summary: Maze project in OpenGL for Graphics and User Interfaces lecture in year 3, semester 2 Summary: Maze project in OpenGL for Graphics and User Interfaces lecture in year 3, semester 2