From 0c8772edbf1858b4e4b80e39127884fc84e5e95d Mon Sep 17 00:00:00 2001 From: Louis-Charles Gaumond <6158962@etu.cegepsth.qc.ca> Date: Mon, 30 Oct 2023 15:52:15 -0400 Subject: [PATCH] Changer l'image background du menu --- SQCSim2021/engine.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 0a91a89..73f812b 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -82,7 +82,7 @@ void Engine::DrawMenu() static const int sButton = 225; glDisable(GL_LIGHTING); - + glDisable(GL_DEPTH_TEST); glDisable(GL_STENCIL_TEST); @@ -99,11 +99,11 @@ void Engine::DrawMenu() glTexCoord2f(0, 0); glVertex2i(0, 0); glTexCoord2f(1, 0); - glVertex2i(800, 0); + glVertex2i(Width(), 0); // glTexCoord2f(1, 1); - glVertex2i(800, 600); + glVertex2i(Width(), Height()); glTexCoord2f(0, 1); - glVertex2i(0, 600); + glVertex2i(0, Height()); glEnd(); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -125,25 +125,28 @@ void Engine::DrawMenu() glVertex2i(0, 300); glEnd(); + + MenuStartTexture.Bind(); glTranslated(80, -225, 0); glBegin(GL_QUADS); glTexCoord2f(0, 0); glVertex2i(0, 100); glTexCoord2f(1, 0); - glVertex2i(sButton, 100); + glVertex2i(sButton , 100); glTexCoord2f(1, 1); glVertex2i(sButton, 200); glTexCoord2f(0, 1); glVertex2i(0, 200); glEnd(); + /*MenuResumeTexture.Bind(); glTranslated(0, -100, 0); glBegin(GL_QUADS); glTexCoord2f(0, 0); glVertex2i(0, 125); - glTexCoord2f(1, 0); + //glTexCoord2f(1, 0); glVertex2i(sButton, 125); glTexCoord2f(1, 1); glVertex2i(sButton, 200); @@ -349,8 +352,8 @@ void Engine::LoadResource() { LoadTexture(m_textureSoloMultiMenu, TEXTURE_PATH "single_multi.png", false); LoadTexture(m_textureTitle, TEXTURE_PATH "title.png", false); - LoadTexture(MenuTitleTexture, MENU_ITEM_PATH "test.png"); - LoadTexture(MenuBGTexture, MENU_ITEM_PATH "test.png"); + LoadTexture(MenuTitleTexture, TEXTURE_PATH "BrouillonbackgroundMenu.png"); + LoadTexture(MenuBGTexture, TEXTURE_PATH "BrouillonbackgroundMenu.png"); LoadTexture(SplachScreenTexture, TEXTURE_PATH "sc2.png"); LoadTexture(MenuQuitTexture, MENU_ITEM_PATH "BasicQuit.png"); LoadTexture(MenuOptionsTexture, MENU_ITEM_PATH "test.png");