Fix sounds & set defaults

Set persistent values to False if None
Play both On & Off Sound
onclick_audio, hardcode the audio and instead have a flag system for
just the transitions menu
This commit is contained in:
Nutbuster 2021-10-12 07:12:09 +11:00
parent 48913f8a83
commit e393cec738
2 changed files with 11 additions and 3 deletions

View File

@ -20,8 +20,11 @@ init python:
#idk non-functional dummies for uisounds hackery
#coming soon
def onclick_audio(flag, audio_filename=["audio/ui/uiOptionOff.wav", "audio/ui/uiOptionOff.wav", "audio/ui/uiOptionOff.wav"]):
renpy.play(audio_filename[int(flag)])
def onclick_audio(flag, _audioflag=False):
audio_filename=["audio/ui/uiOptionOn.wav", "audio/ui/uiOptionOff.wav"]
if _audioflag:
audio_filename=["audio/ui/uiOptionOff.wav", "audio/ui/uiOptionOn.wav"]
renpy.play(audio_filename[int(bool(flag))])
def ToggleAutoUpdate():
onclick_audio(persistent.autoup)
@ -915,7 +918,7 @@ screen preferences():
label _("Skip")
textbutton _("Unseen Text") action [Function(onclick_audio, preferences.skip_unseen), ToggleVariable("preferences.skip_unseen", True, False)]
textbutton _("After Choices") action [Function(onclick_audio, preferences.skip_after_choices), ToggleVariable("preferences.skip_after_choices", True, False)]
textbutton _("Transitions") action [Function(onclick_audio, preferences.transitions), ToggleVariable("preferences.transitions", 0, 2)]
textbutton _("Transitions") action [Function(onclick_audio, preferences.transitions, True), ToggleVariable("preferences.transitions", 0, 2)]
## Additional vboxes of type "radio_pref" or "check_pref" can be
## added here, to add additional creator-defined preferences.

View File

@ -38,6 +38,11 @@ init python:
renpy.music.register_channel("ambient2","sfx",True,tight=True)
if persistent.scroll == True:
config.keymap['dismiss'].append('mousedown_4')
elif persistent.scroll == None:
persistent.scroll = False
if persistent.lewd == None:
persistent.lewd = False
transform randPosition:
alpha 0.0