PinmikPanik/gamedata/objects/sliders/sfxslider.py

17 lines
516 B
Python
Raw Normal View History

2021-09-10 19:22:30 +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
self.currentvalue = self.getvalue()
2021-09-19 22:12:52 +02:00
self.posttext = " % SFX volume"
2021-09-10 19:22:30 +02:00
def change(self):
self.game.globals["sfxvolume"] = self.currentvalue/100
self.game.reinit_volumes()
def getvalue(self):
return self.game.globals["sfxvolume"]*100