Add window icon,

Add digging animation (Non functional)
This commit is contained in:
Bram Verhulst
2024-05-02 12:28:03 +02:00
parent 64915567dc
commit b6be73019f
16 changed files with 140 additions and 101 deletions

View File

@@ -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);