summaryrefslogtreecommitdiffstats
path: root/matchblox/menu/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'matchblox/menu/menu.c')
-rw-r--r--matchblox/menu/menu.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/matchblox/menu/menu.c b/matchblox/menu/menu.c
index 9687a2d..c92c2b8 100644
--- a/matchblox/menu/menu.c
+++ b/matchblox/menu/menu.c
@@ -74,12 +74,16 @@ void MenuAddButton(int f_dXPos, int f_dYPos, int f_dWidth, int f_dHeight, char *
{
int i = g_pCurMenu->m_iButtonCount;
- if (i > MENU_MAX_BUTTONS - 1) return;
-
- // create the button with the right parameters
- g_pCurMenu->m_sButtons[i] = ButtonCreate(f_dXPos, f_dYPos, f_dWidth, f_dHeight, f_pcTitle, f_iType, f_iGroup, i);
- g_pCurMenu->m_iButtonCount = i + 1;
-
+ if (i > MENU_MAX_BUTTONS - 1)
+ {
+ // return
+ }
+ else
+ {
+ // create the button with the right parameters
+ g_pCurMenu->m_sButtons[i] = ButtonCreate(f_dXPos, f_dYPos, f_dWidth, f_dHeight, f_pcTitle, f_iType, f_iGroup, i);
+ g_pCurMenu->m_iButtonCount = i + 1;
+ }
} // MenuAddButton
@@ -211,12 +215,12 @@ void MenuRender(void)
{
glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR);
- glColor3d(0.6, 0.6, 0.7);
- glBegin(GL_TRIANGLE_STRIP);
+ glColor3f(0.6, 0.6, 0.7);
+ glBegin(GL_QUADS);
glVertex2i(0, 0);
- glVertex2i(g_iWinWidth, 0);
glVertex2i(0, g_iWinHeight);
glVertex2i(g_iWinWidth, g_iWinHeight);
+ glVertex2i(g_iWinWidth, 0);
glEnd();
}
@@ -230,7 +234,7 @@ void MenuRender(void)
}
// render cursor
- glColor3d(1, 1, 1);
+ glColor4d(1, 1, 1, 1);
BitmapRender(g_iXPos,
g_iYPos,
64, //g_sCursorImage.m_iWidth,