summaryrefslogtreecommitdiffstats
path: root/menu_demo/main.c
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-04-25 23:46:06 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-04-25 23:46:06 (GMT)
commit0a92d39e9e8774d96a6277f51890ee6eb345b40b (patch)
treeb97e65f2e2ccc19cc7a42e1a0f7a939a81fc9e2a /menu_demo/main.c
parent3f0c80bb6069ac6ac6b66704f5035bcc7e979dd5 (diff)
download2iv55-0a92d39e9e8774d96a6277f51890ee6eb345b40b.zip
2iv55-0a92d39e9e8774d96a6277f51890ee6eb345b40b.tar.gz
2iv55-0a92d39e9e8774d96a6277f51890ee6eb345b40b.tar.bz2
Fokking vette menu shizzle. Druk op spatie om naar andere menu's te schakelen. Wordt later toegevoegd als event aan een button.
Diffstat (limited to 'menu_demo/main.c')
-rw-r--r--menu_demo/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/menu_demo/main.c b/menu_demo/main.c
index 31fdf2c..d802e4c 100644
--- a/menu_demo/main.c
+++ b/menu_demo/main.c
@@ -39,7 +39,6 @@ void render_scene(void)
// glMatrixMode(GL_PROJECTION);
//glPopMatrix();
- glClearColor(1, 1, 1, 1);
MenuRender();
glutSwapBuffers();
@@ -52,6 +51,7 @@ void process_normal_keys(unsigned char key, int x, int y)
{
// escape
if (key == 27) exit(0);
+ if (key == ' ') MenuNext();
} // process_normal_keys
@@ -70,7 +70,7 @@ void process_special_keys(int key, int x, int y)
void process_mouse(int button, int state, int x, int y)
{
- MenuMouseHandle(button, state, x, y);
+ MenuMouseClick(button, state, x, y);
} // process_mouse
@@ -78,7 +78,7 @@ void process_mouse(int button, int state, int x, int y)
void process_passive_mouse(int x, int y)
{
- process_mouse(-1, -1, x, y);
+ MenuMouseMove(x, y);
} // process_passive_mouse