mirror of
https://github.com/dylanbenzi/pacmen-sfml.git
synced 2026-11-27 08:26:59 +00:00
Added Window Icon and disbled resizing of the game window to improve user experience.
This commit is contained in:
+6
-1
@@ -193,9 +193,14 @@ void Game::run() {
|
||||
bool vulnerableModeActive = false;
|
||||
const float vulnerableDurationSeconds = 8.0f; // Duration of vulnerable mode
|
||||
|
||||
auto window = sf::RenderWindow(sf::VideoMode(windowRes), windowName);
|
||||
auto window = sf::RenderWindow(sf::VideoMode(windowRes), windowName, sf::Style::Titlebar | sf::Style::Close);
|
||||
sf::Listener::setGlobalVolume(gameVolume);
|
||||
|
||||
sf::Image icon;
|
||||
if(icon.loadFromFile("assets/icons/pacman.png")) {
|
||||
window.setIcon(icon);
|
||||
}
|
||||
|
||||
sf::Sound sound(*resources.getSound("start"));
|
||||
sound.play();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user