Push lobby labels.
This commit is contained in:
parent
c66e49ab0c
commit
721fef57e2
@ -107,6 +107,9 @@ void Engine::LoadResource() {
|
|||||||
LoadTexture(m_textureOptSensitivity, TEXTURE_PATH "menus/buttons/options/optSensitivity.png", false);
|
LoadTexture(m_textureOptSensitivity, TEXTURE_PATH "menus/buttons/options/optSensitivity.png", false);
|
||||||
LoadTexture(m_textureOptSfx, TEXTURE_PATH "menus/buttons/options/optSfx.png", false);
|
LoadTexture(m_textureOptSfx, TEXTURE_PATH "menus/buttons/options/optSfx.png", false);
|
||||||
|
|
||||||
|
LoadTexture(m_textureLobbyServer, TEXTURE_PATH "menus/labels/labelServer.png", false);
|
||||||
|
LoadTexture(m_textureLobbyIdentify, TEXTURE_PATH "menus/labels/labelIdentify.png", false);
|
||||||
|
LoadTexture(m_textureHd, TEXTURE_PATH "menus/labels/labelHd.png", false);
|
||||||
LoadTexture(m_textureHd, TEXTURE_PATH "menus/labels/labelHd.png", false);
|
LoadTexture(m_textureHd, TEXTURE_PATH "menus/labels/labelHd.png", false);
|
||||||
LoadTexture(m_textureFhd, TEXTURE_PATH "menus/labels/labelFhd.png", false);
|
LoadTexture(m_textureFhd, TEXTURE_PATH "menus/labels/labelFhd.png", false);
|
||||||
LoadTexture(m_textureQhd, TEXTURE_PATH "menus/labels/labelQhd.png", false);
|
LoadTexture(m_textureQhd, TEXTURE_PATH "menus/labels/labelQhd.png", false);
|
||||||
@ -714,19 +717,18 @@ 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_DEPTH_TEST);
|
|
||||||
|
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
|
||||||
|
|
||||||
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,38 +740,29 @@ void Engine::DisplayLobbyMenu() {
|
|||||||
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
|
m_textureLobbyIdentify.Bind();
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glTexCoord2f(0, 0); glVertex2i(Width() * 0.6, Height() * 0.75);
|
||||||
|
glTexCoord2f(1, 0); glVertex2i(Width() * 0.975, Height() * 0.75);
|
||||||
|
glTexCoord2f(1, 1); glVertex2i(Width() * 0.975, Height() * 0.95);
|
||||||
|
glTexCoord2f(0, 1); glVertex2i(Width() * 0.6, Height() * 0.95);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
//glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
//glBegin(GL_QUADS);
|
||||||
|
//glTexCoord2f(0, 0); glVertex2i(Width() * 0.6, Height() * 0.4);
|
||||||
|
//glTexCoord2f(1, 0); glVertex2i(Width() * 0.975, Height() * 0.4);
|
||||||
|
//glTexCoord2f(1, 1); glVertex2i(Width() * 0.975, Height() * 0.475);
|
||||||
|
//glTexCoord2f(0, 1); glVertex2i(Width() * 0.6, Height() * 0.475);
|
||||||
|
//glEnd();
|
||||||
|
|
||||||
m_textureFont.Bind();
|
m_textureFont.Bind();
|
||||||
std::ostringstream ss;
|
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);
|
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.str("");
|
||||||
ss << "_________";
|
ss << "_____________________";
|
||||||
PrintText(Width() * 0.627f, Height() * 0.435f, ss.str(), 2.5f);
|
PrintText(Width() * 0.6f, Height() * 0.4f, ss.str(), 2.5f);
|
||||||
|
ss.str("");
|
||||||
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
@ -782,6 +775,7 @@ void Engine::DisplayLobbyMenu() {
|
|||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::DisplayMainMenu() {
|
void Engine::DisplayMainMenu() {
|
||||||
@ -1226,9 +1220,8 @@ void Engine::Render(float elapsedTime) {
|
|||||||
|
|
||||||
if (m_gamestate == GameState::PLAY) {
|
if (m_gamestate == GameState::PLAY) {
|
||||||
HideCursor();
|
HideCursor();
|
||||||
CenterMouse(); //D<>placement de centermouse dans l'action de jouer
|
CenterMouse();
|
||||||
|
|
||||||
//static float gameTime = elapsedTime;
|
|
||||||
static irrklang::ISound* step; // Pour les sons de pas.
|
static irrklang::ISound* step; // Pour les sons de pas.
|
||||||
static float pollTime = 0;
|
static float pollTime = 0;
|
||||||
static float bulletTime = 0;
|
static float bulletTime = 0;
|
||||||
|
@ -133,6 +133,9 @@ private:
|
|||||||
Texture m_textureFhd;
|
Texture m_textureFhd;
|
||||||
Texture m_textureQhd;
|
Texture m_textureQhd;
|
||||||
Texture m_textureUhd;
|
Texture m_textureUhd;
|
||||||
|
|
||||||
|
Texture m_textureLobbyServer;
|
||||||
|
Texture m_textureLobbyIdentify;
|
||||||
Texture m_textureCheck;
|
Texture m_textureCheck;
|
||||||
Texture m_textureChecked;
|
Texture m_textureChecked;
|
||||||
|
|
||||||
|
BIN
SQCSim2021/media/textures/menus/labels/labelIdentify.png
Normal file
BIN
SQCSim2021/media/textures/menus/labels/labelIdentify.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
SQCSim2021/media/textures/menus/labels/labelServer.png
Normal file
BIN
SQCSim2021/media/textures/menus/labels/labelServer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user