mirror of
https://github.com/dylanbenzi/pacmen-sfml.git
synced 2026-11-27 00:17:01 +00:00
Added Window Icon and disbled resizing of the game window to improve user experience.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
+6
-1
@@ -193,9 +193,14 @@ void Game::run() {
|
|||||||
bool vulnerableModeActive = false;
|
bool vulnerableModeActive = false;
|
||||||
const float vulnerableDurationSeconds = 8.0f; // Duration of vulnerable mode
|
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::Listener::setGlobalVolume(gameVolume);
|
||||||
|
|
||||||
|
sf::Image icon;
|
||||||
|
if(icon.loadFromFile("assets/icons/pacman.png")) {
|
||||||
|
window.setIcon(icon);
|
||||||
|
}
|
||||||
|
|
||||||
sf::Sound sound(*resources.getSound("start"));
|
sf::Sound sound(*resources.getSound("start"));
|
||||||
sound.play();
|
sound.play();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user