Changeset 505:a89ab402b569


Ignore:
Timestamp:
04/09/11 21:13:40 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
63363436343933356664336362333432663730303332646630616532613931623264373634326333
Message:

Pause music when pressing pause in level.

Location:
skaapsteker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/levelscene.py

    r495 r505  
    135135        if self._paused:
    136136            self._world.thaw()
     137            self._soundsystem.unpause()
    137138            self._paused = False
    138139        else:
    139140            self._world.freeze()
     141            self._soundsystem.pause()
    140142            self._paused = True
    141143
  • skaapsteker/sound.py

    r453 r505  
    5656            mixer.stop()
    5757
     58    def pause(self):
     59        if self.sound_enabled:
     60            mixer.music.pause()
     61
     62    def unpause(self):
     63        if self.sound_enabled:
     64            mixer.music.unpause()
Note: See TracChangeset for help on using the changeset viewer.