summaryrefslogtreecommitdiffstats
path: root/menu_demo/menu.c
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-04-17 13:54:49 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-04-17 13:54:49 (GMT)
commit2bb23e67db0e2a23d480126f4e0fc753fa0cde35 (patch)
tree9338f6ddaa9b67c660c12356cd004bbb62a9f16a /menu_demo/menu.c
parentd20cf957944bf243b7496d4c6eed47edad37cda9 (diff)
download2iv55-2bb23e67db0e2a23d480126f4e0fc753fa0cde35.zip
2iv55-2bb23e67db0e2a23d480126f4e0fc753fa0cde35.tar.gz
2iv55-2bb23e67db0e2a23d480126f4e0fc753fa0cde35.tar.bz2
Kleine button update.
Diffstat (limited to 'menu_demo/menu.c')
-rw-r--r--menu_demo/menu.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/menu_demo/menu.c b/menu_demo/menu.c
index 9159d13..9a3c081 100644
--- a/menu_demo/menu.c
+++ b/menu_demo/menu.c
@@ -80,26 +80,26 @@ void MenuRender(void)
glDisable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
- glColor3d(1, 1, 1);
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
-
- glLoadIdentity();
- glOrtho(0, (GLfloat)g_iWinWidth, (GLfloat)g_iWinHeight, 0, 0, 1);
- glMatrixMode(GL_MODELVIEW);
-
- // render the buttons on the current menu
+ glColor3d(1, 1, 1);
+
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+
+ glLoadIdentity();
+ glOrtho(0, (GLfloat)g_iWinWidth, (GLfloat)g_iWinHeight, 0, 0, 1);
+ glMatrixMode(GL_MODELVIEW);
+
+ // render the buttons on the current menu
while (i < g_pCurMenu->m_iButtonCount)
{
ButtonRender(&g_pCurMenu->m_sButtons[i]);
i++;
- }
-
- //restore the previous projection matrix
- glMatrixMode(GL_PROJECTION);
-
- glPopMatrix();
+ }
+
+ //restore the previous projection matrix
+ glMatrixMode(GL_PROJECTION);
+
+ glPopMatrix();
glMatrixMode(GL_MODELVIEW);
} // MenuRender
@@ -120,8 +120,8 @@ void MenuMouseHandle(int f_iGlutButton, int f_iGlutState, int f_iXPos, int f_iYP
// f_iGlutState
// # GLUT_DOWN
// # GLUT_UP
-
- // check if any button needs attention from the mouse
+
+ // check if any button needs attention from the mouse
while (i < g_pCurMenu->m_iButtonCount)
{
l_dXPos = g_pCurMenu->m_sButtons[i].m_dXPos;