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

File diff suppressed because it is too large Load Diff