2021-06-25 14:42:35 +02:00
|
|
|
from gamedata.objects.sliders.slider import Slider
|
|
|
|
|
|
|
|
class SFXSlider(Slider):
|
|
|
|
def __init__(self,x,y,game,w=100,h=64,folder="base"):
|
|
|
|
super().__init__(x,y,game,w,h,folder) # initialise l'objet de base avec les bons arguments
|
|
|
|
|
2021-06-25 16:13:52 +02:00
|
|
|
self.currentvalue = self.getvalue()
|
2021-06-25 14:42:35 +02:00
|
|
|
|
|
|
|
self.posttext = " % Effets Sonores"
|
|
|
|
|
2021-06-25 16:13:52 +02:00
|
|
|
def change(self):
|
|
|
|
self.game.globals["sfxvolume"] = self.currentvalue/100
|
|
|
|
self.game.reinit_volumes()
|
2021-06-25 14:42:35 +02:00
|
|
|
|
2021-06-25 16:13:52 +02:00
|
|
|
def getvalue(self):
|
|
|
|
return self.game.globals["sfxvolume"]*100
|