Code: Select all
if config.has_music:
label _("Music Volume")
hbox:
bar value Preference("music volume")
kb_increment 0.05 #hypothetical how would you do this?
kb_decrement 0.05 #hypothetical how would you do this?
Code: Select all
if config.has_music:
label _("Music Volume")
hbox:
bar value Preference("music volume")
kb_increment 0.05 #hypothetical how would you do this?
kb_decrement 0.05 #hypothetical how would you do this?
Code: Select all
#At the beginning of the screens file
init python:
def set_music_volume(vol):
preferences.set_volume("music",vol)
#In the preferences screen
if config.has_music:
label _("Music Volume")
default music_volume = 1.0
hbox:
bar adjustment ui.adjustment(value=music_volume,range=1.0,adjustable=True,step=0.05,changed=set_music_volume)
Thanks for trying. Maybe we have to edit the main Renpy PY files to change the step value.Tess wrote: ↑Thu Oct 20, 2022 10:19 pmThis is what I came up with:I don't think it's possible to hand MixerValue("music") or Preference("music volume") directly to the ui.adjustment object, it kept complaining about wanting an int or float rather than a MixerValue object.Code: Select all
#At the beginning of the screens file init python: def set_music_volume(vol): preferences.set_volume("music",vol) #In the preferences screen if config.has_music: label _("Music Volume") default music_volume = 1.0 hbox: bar adjustment ui.adjustment(value=music_volume,range=1.0,adjustable=True,step=0.05,changed=set_music_volume)
Users browsing this forum: Bing [Bot]