mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 21:11:47 +01:00
Add window icon,
Add digging animation (Non functional)
This commit is contained in:
@@ -107,7 +107,7 @@ void BaseGame::InitializeGameEngine()
|
||||
|
||||
// Setup Dear ImGui style
|
||||
ImGui::StyleColorsDark();
|
||||
//ImGui::StyleColorsLight();
|
||||
// ImGui::StyleColorsLight();
|
||||
|
||||
// Setup Platform/Renderer backends
|
||||
ImGui_ImplSDL2_InitForOpenGL(m_pWindow, m_pContext);
|
||||
@@ -146,6 +146,10 @@ void BaseGame::InitializeGameEngine()
|
||||
return;
|
||||
}
|
||||
|
||||
m_pIcon = IMG_Load("icon.png");
|
||||
SDL_SetWindowIcon(m_pWindow, m_pIcon);
|
||||
|
||||
// delete icon;
|
||||
|
||||
//Initialize controller
|
||||
m_pGameController = nullptr;
|
||||
@@ -270,6 +274,9 @@ void BaseGame::CleanupGameEngine()
|
||||
ImGui_ImplSDL2_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
||||
SDL_FreeSurface(m_pIcon);
|
||||
delete m_pIcon;
|
||||
|
||||
SDL_GL_DeleteContext(m_pContext);
|
||||
|
||||
SDL_DestroyWindow(m_pWindow);
|
||||
|
||||
Reference in New Issue
Block a user