Skip to content

Commit

Permalink
Added icon for the window.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuridHound committed Nov 9, 2019
1 parent c98f58f commit 1c5ac6f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 19 additions & 3 deletions source/GameEngine/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ void GameEngine::run()

backgroundManager.draw(window);
geometry.draw(window);

window->display();
}

Expand All @@ -97,8 +96,25 @@ void GameEngine::run()
//
GameEngine::GameEngine()
{
window = new sf::RenderWindow(sf::VideoMode(1920, 1080), title, sf::Style::Fullscreen);

initializeWindow();

backgroundManager.changeBackground();
geometry.loadLevel();
geometry.loadLevel(2);
}


//
//
void GameEngine::initializeWindow()
{

sf::Image icon;
icon.loadFromFile("resources/Textures/Runes/0.png");

window = new sf::RenderWindow(sf::VideoMode(1920, 1080), title, sf::Style::Fullscreen);

window->setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr());

return;
}
2 changes: 2 additions & 0 deletions source/GameEngine/GameEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class GameEngine final

private :

void initializeWindow();

const char* title = "Mahjong";

BackgroundManager backgroundManager;
Expand Down

0 comments on commit 1c5ac6f

Please sign in to comment.