Avancement Page Option
This commit is contained in:
parent
75a32270b5
commit
83e438583f
@ -275,6 +275,50 @@ void Engine::DrawMenu()
|
|||||||
ShowCursor();
|
ShowCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Engine::DrawOption()
|
||||||
|
{
|
||||||
|
static const int sTitle = 400;
|
||||||
|
static const int sButton = 225;
|
||||||
|
|
||||||
|
glDisable(GL_LIGHTING);
|
||||||
|
|
||||||
|
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
glDisable(GL_STENCIL_TEST);
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glPushMatrix();
|
||||||
|
glLoadIdentity();
|
||||||
|
glOrtho(0, Width(), 0, Height(), -1, 1);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glPushMatrix();
|
||||||
|
|
||||||
|
MenuOptionsTexture.Bind();
|
||||||
|
glLoadIdentity();
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glTexCoord2f(0, 0);
|
||||||
|
glVertex2i(0, 0);
|
||||||
|
glTexCoord2f(1, 0);
|
||||||
|
glVertex2i(Width(), 0); //
|
||||||
|
glTexCoord2f(1, 1);
|
||||||
|
glVertex2i(Width(), Height());
|
||||||
|
glTexCoord2f(0, 1);
|
||||||
|
glVertex2i(0, Height());
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
glBlendEquation(GL_FUNC_ADD);
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
|
//glEnable(GL_LIGHTING);
|
||||||
|
glDisable(GL_BLEND);
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glPopMatrix();
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glPopMatrix();
|
||||||
|
ShowCursor();
|
||||||
|
}
|
||||||
|
|
||||||
void Engine::Init() {
|
void Engine::Init() {
|
||||||
|
|
||||||
|
|
||||||
@ -1129,6 +1173,10 @@ void Engine::Render(float elapsedTime) {
|
|||||||
}
|
}
|
||||||
else if (m_gamestate == GameState::SINGLEMULTI)
|
else if (m_gamestate == GameState::SINGLEMULTI)
|
||||||
DisplaySingleOrMultiplayerMenu();
|
DisplaySingleOrMultiplayerMenu();
|
||||||
|
else if (m_gamestate == GameState::MAIN_MENU)
|
||||||
|
{
|
||||||
|
DrawOption();
|
||||||
|
}
|
||||||
else if (m_gamestate == GameState::QUIT)
|
else if (m_gamestate == GameState::QUIT)
|
||||||
Stop();
|
Stop();
|
||||||
}
|
}
|
||||||
@ -1322,6 +1370,8 @@ void Engine::MousePressEvent(const MOUSE_BUTTON& button, int x, int y) {
|
|||||||
m_gamestate = GameState::SINGLEMULTI;
|
m_gamestate = GameState::SINGLEMULTI;
|
||||||
if ((m_mousemx >= 305 && m_mousemx <= 450) && (m_mousemy >= 300 && m_mousemy <= 400))
|
if ((m_mousemx >= 305 && m_mousemx <= 450) && (m_mousemy >= 300 && m_mousemy <= 400))
|
||||||
m_gamestate = GameState::OPTIONS;
|
m_gamestate = GameState::OPTIONS;
|
||||||
|
if ((m_mousemx >= 305 && m_mousemx <= 450) && (m_mousemy >= 450 && m_mousemy <= 500))
|
||||||
|
m_gamestate = GameState::QUIT;
|
||||||
}
|
}
|
||||||
else if (m_gamestate == GameState::SINGLEMULTI)
|
else if (m_gamestate == GameState::SINGLEMULTI)
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,7 @@ public:
|
|||||||
Engine();
|
Engine();
|
||||||
virtual ~Engine();
|
virtual ~Engine();
|
||||||
virtual void DrawMenu();
|
virtual void DrawMenu();
|
||||||
|
virtual void DrawOption();
|
||||||
virtual void DrawSplachScreen();
|
virtual void DrawSplachScreen();
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
virtual void DeInit();
|
virtual void DeInit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user