• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

muting music when game is minimalized [closed]

U

Ulcius

Guest
Hey, hey,
I am working on a multiplatform game. On PC version, whenever I minimalize game (by pressing 'windows' button on keyboard) the music from the game is still playing. I was asked to fix that and I find myself quite confused how to do that. I mean I know how to mute sounds, but I just can't figure out how to trigger it when game is minimalized. Is there any function for that? Should I be checking window size or something?
 

nesrocks

Member
I just added the same thing to my game, with the option for the user to turn on or off the out of focus muting. Nice idea :)
 
Top