Push de quoi

This commit is contained in:
mduval76 2023-12-07 13:55:44 -05:00
parent 63d8a62429
commit c66e49ab0c
2 changed files with 36 additions and 1912 deletions

View File

@ -714,50 +714,67 @@ void Engine::DisplaySplashScreen() {
void Engine::DisplayLobbyMenu() {
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
glDisable(GL_STENCIL_TEST);
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendEquation(GL_FUNC_ADD);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0, Width(), 0, Height(), -1, 1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
m_textureLobbyMenu.Bind();
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2i(0, 0);
glTexCoord2f(1, 0); glVertex2i(Width(), 0);
glTexCoord2f(1, 1); glVertex2i(Width(), Height());
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();
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
m_textureFont.Bind();
std::ostringstream ss;
ss.str("");
ss << "Identify yourself!";
PrintText(Width() * 0.625f, Height() * 0.825f, ss.str(), 2.5f);
glBindTexture(GL_TEXTURE_2D, 0);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2i(Width() * 0.6, Height() * 0.47);
glTexCoord2f(1, 0); glVertex2i(Width() * 0.95, Height() * 0.47);
glTexCoord2f(1, 1); glVertex2i(Width() * 0.95, Height() * 0.475);
glTexCoord2f(0, 1); glVertex2i(Width() * 0.6, Height() * 0.475);
glEnd();
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2i(Width() * 0.6, Height() * 0.415);
glTexCoord2f(1, 0); glVertex2i(Width() * 0.95, Height() * 0.415);
glTexCoord2f(1, 1); glVertex2i(Width() * 0.95, Height() * 0.42);
glTexCoord2f(0, 1); glVertex2i(Width() * 0.6, Height() * 0.42);
glEnd();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
m_textureFont.Bind();
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
ss.str("");
ss << "_________";
PrintText(Width() * 0.627f, Height() * 0.435f, ss.str(), 2.5f);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glBindTexture(GL_TEXTURE_2D, 0);
glBegin(GL_QUADS);
glTexCoord2f(0, 0); glVertex2i(Width() * 0.6, Height() * 0.425);
glTexCoord2f(1, 0); glVertex2i(Width() * 0.95, Height() * 0.425);
glTexCoord2f(1, 1); glVertex2i(Width() * 0.95, Height() * 0.475);
glTexCoord2f(0, 1); glVertex2i(Width() * 0.6, Height() * 0.475);
glEnd();
glViewport(viewport[0], viewport[1], viewport[2], viewport[3]);
glEnable(GL_STENCIL_TEST);
glEnable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);

File diff suppressed because it is too large Load Diff