sounds revamp

This commit is contained in:
Nio
2021-08-08 00:42:16 +10:00
parent d59f59ca88
commit 16e8e5a72a
8 changed files with 106 additions and 38 deletions

Binary file not shown.

Binary file not shown.

BIN
game/audio/ui/uiFail.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
###Updater Python stuff### ###Updater Python stuff###
init python: init python:
if renpy.variant("pc"): #Don't run this on mobile, not supported if renpy.variant("pc"): #Don't run this on mobile, not supported
if persistent.updateresult is None: if persistent.updateresult is None:
@ -17,9 +17,65 @@ init python:
else: else:
persistent.updateresult = pendingVersion persistent.updateresult = pendingVersion
#idk non-functional dummies for uisounds hackery
#coming soon
def ToggleAutoUpdate(): def ToggleAutoUpdate():
if persistent.autoup == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
persistent.autoup = not persistent.autoup persistent.autoup = not persistent.autoup
def ToggleLewd():
if persistent.lewd == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
persistent.lewd = not persistent.lewd
def ToggleScroll():
if persistent.scroll == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
persistent.scroll = not persistent.scroll
def ToggleSkip():
if preferences.skip_unseen == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
preferences.skip_unseen = not preferences.skip_unseen
def ToggleAfterChoices():
if preferences.skip_after_choices == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
preferences.skip_after_choices = not preferences.skip_after_choices
def ToggleTransitions():
if preferences.transitions == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
preferences.transitions = not preferences.transitions
# def ToggleMuteAll():
# if preferences.all_mute == True:
# renpy.play("audio/ui/uiOptionOff.wav")
# else:
# renpy.play("audio/ui/uiOptionOn.wav")
# preferences.all_mute = not preferences.all_mute
def ToggleAutoForwardMove():
if preferences.afm_enable == True:
renpy.play("audio/ui/uiOptionOff.wav")
else:
renpy.play("audio/ui/uiOptionOn.wav")
preferences.afm_enable = not preferences.afm_enable
################################################################################ ################################################################################
## Initialization ## Initialization
################################################################################ ################################################################################
@ -48,7 +104,7 @@ style gui_text:
style button: style button:
properties gui.button_properties("button") properties gui.button_properties("button")
activate_sound "audio/ui/uiClick.wav" # activate_sound "audio/ui/uiClick.wav"
style button_text is gui_text: style button_text is gui_text:
properties gui.text_properties("button") properties gui.text_properties("button")
@ -266,6 +322,10 @@ screen quick_button(filename, label, function):
xmaximum 80 xmaximum 80
ymaximum 72 ymaximum 72
action function action function
if 'Return' in label or 'Back' in label or 'Menu' in label:
activate_sound "audio/ui/uiBack.wav"
else:
activate_sound "audio/ui/uiClick.wav"
fixed: fixed:
add filename xalign 0.5 yalign 0.5 zoom 1 add filename xalign 0.5 yalign 0.5 zoom 1
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 22 style "quick_button_text" text label xalign 0.5 yalign 0.5 xanchor 0.5 size 22 style "quick_button_text"
@ -351,22 +411,22 @@ screen navigation():
spacing gui.navigation_spacing spacing gui.navigation_spacing
textbutton _("History") action ShowMenu("history") textbutton _("History") activate_sound "audio/ui/uiClick.wav" action ShowMenu("history")
textbutton _("Save") action ShowMenu("save") textbutton _("Save") activate_sound "audio/ui/uiClick.wav" action ShowMenu("save")
textbutton _("Load") action ShowMenu("load") textbutton _("Load") activate_sound "audio/ui/uiClick.wav" action ShowMenu("load")
textbutton _("Delete") action ShowMenu("delete") textbutton _("Delete") activate_sound "audio/ui/uiClick.wav" action ShowMenu("delete")
textbutton _("Options") action ShowMenu("preferences") textbutton _("Options") activate_sound "audio/ui/uiClick.wav" action ShowMenu("preferences")
#textbutton _("Extras") action ShowMenu("extras") #textbutton _("Extras") action ShowMenu("extras")
textbutton _("Return") action Return() textbutton _("Return") activate_sound "audio/ui/uiBack.wav" action Return()
if _in_replay: if _in_replay:
textbutton _("End Replay") action EndReplay(confirm=True) textbutton _("End Replay") activate_sound "audio/ui/uiBack.wav" action EndReplay(confirm=True)
elif not main_menu: elif not main_menu:
textbutton _("Main Menu") action MainMenu() textbutton _("Main Menu") activate_sound "audio/ui/uiBack.wav" action MainMenu()
#textbutton _("Debug Score Card") action ShowMenu("score_menu") #textbutton _("Debug Score Card") action ShowMenu("score_menu")
#if renpy.variant("pc"): #if renpy.variant("pc"):
@ -399,6 +459,10 @@ screen main_menu_button(filename, label, function):
xmaximum 500 xmaximum 500
ymaximum 129 ymaximum 129
action function action function
if 'Back' in label or 'Return' in label or 'Quit' in label or 'Main Menu' in label:
activate_sound "audio/ui/uiBack.wav"
else:
activate_sound "audio/ui/uiClick.wav"
fixed: fixed:
add filename xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5 add filename xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5
text label xalign 0.5 yalign 0.5 xanchor 0.5 text label xalign 0.5 yalign 0.5 xanchor 0.5
@ -678,7 +742,7 @@ screen updates():
label _("Update Checker:") label _("Update Checker:")
label _("{color=#FFFFFF}{size=32}[persistent.updateresult!t]{/size}{/color}") label _("{color=#FFFFFF}{size=32}[persistent.updateresult!t]{/size}{/color}")
textbutton _("{size=36}Check for Update\n{/size}") action [Notify("Checking for update..."), Function(UpdateCheck)] textbutton _("{size=36}Check for Update\n{/size}") activate_sound "audio/ui/uiClick.wav" action [Notify("Checking for update..."), Function(UpdateCheck)]
label _("Updater:") label _("Updater:")
label _("{color=#FFFFFF}{size=32}Server URL (click to edit):{/size}{/color}") label _("{color=#FFFFFF}{size=32}Server URL (click to edit):{/size}{/color}")
@ -699,7 +763,7 @@ screen updates():
if persistent.updateresult != "No new version is available": if persistent.updateresult != "No new version is available":
textbutton _("{size=36}Update Now!\n{/size}") activate_sound "audio/ui/uiNotification.wav" action [updater.Update(persistent.updateWebServer, force=False)] textbutton _("{size=36}Update Now!\n{/size}") activate_sound "audio/ui/uiNotification.wav" action [updater.Update(persistent.updateWebServer, force=False)]
else: else:
textbutton _("{size=36}Update Now!\n{/size}") activate_sound "audio/ui/uiBack.wav" action [Notify("Nothing to update to!")] textbutton _("{size=36}Update Now!\n{/size}") activate_sound "audio/ui/uiFail.wav" action [Notify("Nothing to update to!")]
use extrasnavigation use extrasnavigation
## Load and Save screens ####################################################### ## Load and Save screens #######################################################
@ -794,19 +858,19 @@ screen file_slots(title, flag=False):
spacing gui.page_spacing spacing gui.page_spacing
textbutton _("<") action FilePagePrevious() textbutton _("<") activate_sound "audio/ui/uiRollover.wav" action FilePagePrevious()
if config.has_autosave: if config.has_autosave:
textbutton _("{#auto_page}A") action FilePage("auto") textbutton _("{#auto_page}A") activate_sound "audio/ui/uiClick.wav" action FilePage("auto")
if config.has_quicksave: if config.has_quicksave:
textbutton _("{#quick_page}Q") action FilePage("quick") textbutton _("{#quick_page}Q") activate_sound "audio/ui/uiClick.wav" action FilePage("quick")
## range(1, 10) gives the numbers from 1 to 9. ## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10): for page in range(1, 10):
textbutton "[page]" action FilePage(page) textbutton "[page]" activate_sound "audio/ui/uiClick.wav" action FilePage(page)
textbutton _(">") action FilePageNext() textbutton _(">") activate_sound "audio/ui/uiRollover.wav" action FilePageNext()
style page_label is gui_label style page_label is gui_label
@ -864,32 +928,32 @@ screen preferences():
vbox: vbox:
style_prefix "radio" style_prefix "radio"
label _("Display") label _("Display")
textbutton _("Window") action Preference("display", "any window") textbutton _("Window") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "any window")
textbutton _("Fullscreen") action Preference("display", "fullscreen") textbutton _("Fullscreen") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "fullscreen")
vbox: vbox:
style_prefix "radio" style_prefix "radio"
label _("Rollback Side") label _("Rollback Side")
textbutton _("Disable") action Preference("rollback side", "disable") textbutton _("Disable") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "disable")
textbutton _("Left") action Preference("rollback side", "left") textbutton _("Left") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "left")
textbutton _("Right") action Preference("rollback side", "right") textbutton _("Right") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "right")
vbox: vbox:
style_prefix "check" style_prefix "check"
label _("Naughty Stuff") label _("Naughty Stuff")
textbutton _("Enable Lewd Images") action ToggleVariable("persistent.lewd", True, False) textbutton _("Enable Lewd Images") action [ToggleVariable("persistent.dummylewd", True, False), Function(ToggleLewd)]
vbox: vbox:
style_prefix "check" style_prefix "check"
label _("Requires Restart") label _("Requires Restart")
textbutton _("Enable Forward-Scroll Movement") action ToggleVariable("persistent.scroll", True, False) textbutton _("Enable Forward-Scroll Movement") action [ToggleVariable("persistent.dummyscroll", True, False), Function(ToggleScroll)]
vbox: vbox:
style_prefix "check" style_prefix "check"
label _("Skip") label _("Skip")
textbutton _("Unseen Text") action Preference("skip", "toggle") textbutton _("Unseen Text") action [ToggleVariable("persistent.dummyunseentext", True, False), Function(ToggleSkip)]
textbutton _("After Choices") action Preference("after choices", "toggle") textbutton _("After Choices") action [ToggleVariable("persistent.dummyafterchoices", True, False), Function(ToggleAfterChoices)]
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle")) textbutton _("Transitions") action [ToggleVariable("persistent.dummytransitions", True, False), InvertSelected(Function(ToggleTransitions))]
## Additional vboxes of type "radio_pref" or "check_pref" can be ## Additional vboxes of type "radio_pref" or "check_pref" can be
## added here, to add additional creator-defined preferences. ## added here, to add additional creator-defined preferences.

View File

@ -158,17 +158,17 @@ screen cg_gallery(flag, __yoffset = 0, origin = 'CG'):
textbutton _(cp['name']) text_color gui.selected_color text_xalign 0.5 textbutton _(cp['name']) text_color gui.selected_color text_xalign 0.5
else: else:
if cp['eval'] is None: if cp['eval'] is None:
textbutton _(cp['name']) action ShowMenu('cg_gallery_'+flag, 0, cp['name']) text_xalign 0.5 textbutton _(cp['name']) activate_sound "audio/ui/uiClick.wav" action ShowMenu('cg_gallery_'+flag, 0, cp['name']) text_xalign 0.5
elif eval(cp['eval']): elif eval(cp['eval']):
textbutton _(cp['name']) action ShowMenu('cg_gallery_'+flag, 0, cp['name']) text_xalign 0.5 textbutton _(cp['name']) activate_sound "audio/ui/uiClick.wav" action ShowMenu('cg_gallery_'+flag, 0, cp['name']) text_xalign 0.5
else: else:
textbutton _(cp['name']) text_xalign 0.5 textbutton _(cp['name']) text_xalign 0.5
textbutton _("Return") action ShowMenu('main_menu') text_xalign 0.5 textbutton _("Return") activate_sound "audio/ui/uiBack.wav" action ShowMenu('main_menu') text_xalign 0.5
if _in_replay: if _in_replay:
textbutton _("End Replay") action EndReplay(confirm=True) textbutton _("End Replay") activate_sound "audio/ui/uiBack.wav" action EndReplay(confirm=True)
elif not main_menu: elif not main_menu:
textbutton _("Main Menu") action MainMenu() textbutton _("Main Menu") activate_sound "audio/ui/uiBack.wav" action MainMenu()
transform: transform:
zoom 0.95 zoom 0.95

View File

@ -10,6 +10,10 @@ screen mod_menu_button(filename, label, function):
xmaximum 600 xmaximum 600
ymaximum 129 ymaximum 129
action function action function
if 'Back' in label or 'Return' in label or 'Quit' in label or 'Main Menu' in label:
activate_sound "audio/ui/uiBack.wav"
else:
activate_sound "audio/ui/uiClick.wav"
fixed: fixed:
add filename xalign 0.5 yalign 0.5 zoom 0.9 add filename xalign 0.5 yalign 0.5 zoom 0.9
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 34 text label xalign 0.5 yalign 0.5 xanchor 0.5 size 34