From 5dc3c16842b5ad0c4fe72fafe0eed61f12fbf93a Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20BERNIGAUD?= Date: Mon, 24 May 2010 22:46:17 +0200 Subject: [PATCH] The damage bar now appear in the option menu --- Source/GameDraw.cpp | 16 ++++++++++++---- Source/GameTick.cpp | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index c3b087d..039df01 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -2522,7 +2522,7 @@ int Game::DrawGLScene(StereoSide side) glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix if(mainmenu==3){ - nummenuitems=13; + nummenuitems=14; if((float)newscreenwidth>(float)newscreenheight*1.61||(float)newscreenwidth<(float)newscreenheight*1.59)sprintf (menustring[0], "Resolution: %d*%d",(int)newscreenwidth,(int)newscreenheight); else sprintf (menustring[0], "Resolution: %d*%d (widescreen)",(int)newscreenwidth,(int)newscreenheight); startx[0]=10+20; @@ -2608,15 +2608,23 @@ int Game::DrawGLScene(StereoSide side) sprintf (menustring[11], "Volume: %d%%", (int)(volume*100)); startx[11]=10+60; - starty[11]=155; + starty[11]=160; endx[11]=startx[11]+strlen(menustring[11])*10; endy[11]=starty[11]+20; movex[11]=0; movey[11]=0; + sprintf (menustring[13], "Damage Bar: %s",(showdamagebar?"on":"off")); + startx[13]=30; + starty[13]=125; + endx[13]=startx[13]+strlen(menustring[13])*10; + endy[13]=starty[13]+20; + movex[13]=0; + movey[13]=0; + sprintf (menustring[7], "-Configure Controls-"); startx[7]=10+15; - starty[7]=100; + starty[7]=90; endx[7]=startx[7]+strlen(menustring[7])*10; endy[7]=starty[7]+20; movex[7]=0; @@ -2624,7 +2632,7 @@ int Game::DrawGLScene(StereoSide side) sprintf (menustring[12], "-Configure Stereo -"); startx[12]=10+15; - starty[12]=60; + starty[12]=55; endx[12]=startx[12]+strlen(menustring[7])*10; endy[12]=starty[12]+20; movex[12]=0; diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 00bcdc4..2328eb8 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -3110,6 +3110,9 @@ void Game::Tick() mainmenu=18; keyselect = -1; } + if(Button() && !oldbutton && selected == 13) { + showdamagebar=!showdamagebar; + } if(Button()&&!oldbutton&&selected==8){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; -- 2.39.5