"You think"? o_0; This topic didn't really help me figuring it out. I want to add another audio volume slider under preferences. Adding the slider in screen.rpy was easy. Now I got kinda lost in the "old ways" versus "new ways" of the whole screen language thingy. Plus the whole OOP approach is still kinda bizarrely abstact to me...PyTom wrote: http://lemmasoft.renai.us/forums/viewtopic.php?p=330237
I think the preferred way is something like:Code: Select all
bar value VariableValue("foo", 100)
My question is: Where and how do I add a function or method that change the volume of that audio channel according to the bar slider? Instead of Preference("sound volume") I place there my own function?
EDIT: The Answer is the function is indeed put right into the screen definition with bar value <function>.
In my case I wanted to add a 4th mixer. It took me a while to dig up from the old and new documention, that renpy.music.register_channel( ) not only registers named channels, but also allows to create a new mixer at the same time.
Code: Select all
screen volume_controls:
frame:
has vbox
label _("Ambience Volume")
bar value MixerValue("ambience")