Merge pull request 'UI Sounds v2' (#71) from nutbuster/SnootGame:nio_mustard into Monster-Update-6

Reviewed-on: https://git.snootgame.xyz/Cavemanon/SnootGame/pulls/71
This commit is contained in:
Nutbuster 2021-08-08 03:32:29 +00:00
commit 60a6f8acac
10 changed files with 121 additions and 67 deletions

36
.gitignore vendored
View File

@ -1,9 +1,9 @@
# IToddler files
# macOS-related files
.DS_Store
.AppleDouble
.LSOverride
# Windows cancer
# Windows-related files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
@ -15,16 +15,36 @@ ehthumbs_vista.db
/traceback.txt
/errors.txt
/log.txt
log.txt
errors.txt
traceback.txt
#Vim swap files
.sw?
*~
*.bak
#save files & cache files
/game/saves/
/game/saves/*
/game/cache/*
/game/cache
saves
tmp
cache
env
#binary files
*.rpyc
*.rpyb
*.rpymc
*.pyc
*.pyo
#Vim (best text editor) swap files
.sw?
#cache files
/game/cache/*
#save files
/game/saves/*
#binary files
*.rpyc
*.rpymc

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.

Binary file not shown.

View File

@ -1,24 +1,44 @@
###Updater Python stuff###
init python:
if renpy.variant("pc"): #Don't run this on mobile, not supported
if persistent.updateresult is None:
persistent.updateresult = "No new version is available"
if persistent.autoup is None:
persistent.autoup = False
if persistent.updateWebServer is None:
persistent.updateWebServer = "http://updates.snootgame.xyz/updates.json"
if renpy.variant("pc"): #Don't run this on mobile, not supported
if persistent.updateresult is None:
persistent.updateresult = "No new version is available"
if persistent.autoup is None:
persistent.autoup = False
if persistent.updateWebServer is None:
persistent.updateWebServer = "http://updates.snootgame.xyz/updates.json"
def UpdateCheck():
# WHY YES I ONLY ALLOW PEOPLE USING MY FRAMEWORK TO CHECK FOR AN UPDATE EVERY SIX FUCKING HOURS HOW DID YOU KNOW
# NOPE check_interval=5 (5 SECONDS) FUCK YOU
pendingVersion = updater.UpdateVersion(persistent.updateWebServer, check_interval=5)
if pendingVersion == None or pendingVersion == config.version or "TEST" in pendingVersion:
persistent.updateresult = "No new version is available"
else:
persistent.updateresult = pendingVersion
def UpdateCheck():
# WHY YES I ONLY ALLOW PEOPLE USING MY FRAMEWORK TO CHECK FOR AN UPDATE EVERY SIX FUCKING HOURS HOW DID YOU KNOW
# NOPE check_interval=5 (5 SECONDS) FUCK YOU
pendingVersion = updater.UpdateVersion(persistent.updateWebServer, check_interval=5)
if pendingVersion == None or pendingVersion == config.version or "TEST" in pendingVersion:
persistent.updateresult = "No new version is available"
else:
persistent.updateresult = pendingVersion
#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 ToggleAutoUpdate():
onclick_audio(persistent.autoup)
preferences.autoup = not preferences.autoup
def ToggleAutoForwardMove():
onclick_audio(persistent.afm_enable)
preferences.afm_enable = not preferences.afm_enable
# 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 ToggleAutoUpdate():
persistent.autoup = not persistent.autoup
################################################################################
## Initialization
@ -48,7 +68,7 @@ style gui_text:
style button:
properties gui.button_properties("button")
activate_sound "audio/ui/uiClick.wav"
# activate_sound "audio/ui/uiClick.wav"
style button_text is gui_text:
properties gui.text_properties("button")
@ -251,6 +271,7 @@ style choice_vbox:
style choice_button is default:
properties gui.button_properties("choice_button")
activate_sound "audio/ui/uiRollover.wav"
style choice_button_text is default:
properties gui.button_text_properties("choice_button")
@ -266,6 +287,10 @@ screen quick_button(filename, label, function):
xmaximum 80
ymaximum 72
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:
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"
@ -351,22 +376,22 @@ screen navigation():
spacing gui.navigation_spacing
textbutton _("History") action ShowMenu("history")
textbutton _("Save") action ShowMenu("save")
textbutton _("Load") action ShowMenu("load")
textbutton _("Delete") action ShowMenu("delete")
textbutton _("Options") action ShowMenu("preferences")
textbutton _("History") activate_sound "audio/ui/uiClick.wav" action ShowMenu("history")
textbutton _("Save") activate_sound "audio/ui/uiClick.wav" action ShowMenu("save")
textbutton _("Load") activate_sound "audio/ui/uiClick.wav" action ShowMenu("load")
textbutton _("Delete") activate_sound "audio/ui/uiClick.wav" action ShowMenu("delete")
textbutton _("Options") activate_sound "audio/ui/uiClick.wav" action ShowMenu("preferences")
#textbutton _("Extras") action ShowMenu("extras")
textbutton _("Return") action Return()
textbutton _("Return") activate_sound "audio/ui/uiBack.wav" action Return()
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:
textbutton _("Main Menu") action MainMenu()
textbutton _("Main Menu") activate_sound "audio/ui/uiBack.wav" action MainMenu()
#textbutton _("Debug Score Card") action ShowMenu("score_menu")
#if renpy.variant("pc"):
@ -399,6 +424,10 @@ screen main_menu_button(filename, label, function):
xmaximum 500
ymaximum 129
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:
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
@ -678,7 +707,8 @@ screen updates():
label _("Update Checker:")
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 _("{color=#FFFFFF}{size=32}Server URL (click to edit):{/size}{/color}")
@ -699,7 +729,7 @@ screen updates():
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)]
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
## Load and Save screens #######################################################
@ -794,19 +824,19 @@ screen file_slots(title, flag=False):
spacing gui.page_spacing
textbutton _("<") action FilePagePrevious()
textbutton _("<") activate_sound "audio/ui/uiRollover.wav" action FilePagePrevious()
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:
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.
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
@ -864,32 +894,31 @@ screen preferences():
vbox:
style_prefix "radio"
label _("Display")
textbutton _("Window") action Preference("display", "any window")
textbutton _("Fullscreen") action Preference("display", "fullscreen")
textbutton _("Window") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "any window")
textbutton _("Fullscreen") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "fullscreen")
vbox:
style_prefix "radio"
label _("Rollback Side")
textbutton _("Disable") action Preference("rollback side", "disable")
textbutton _("Left") action Preference("rollback side", "left")
textbutton _("Right") action Preference("rollback side", "right")
textbutton _("Disable") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "disable")
textbutton _("Left") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "left")
textbutton _("Right") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "right")
vbox:
style_prefix "check"
label _("Naughty Stuff")
textbutton _("Enable Lewd Images") action ToggleVariable("persistent.lewd", True, False)
textbutton _("Enable Lewd Images") action [Function(onclick_audio, persistent.lewd), ToggleVariable("persistent.lewd", True, False)]
vbox:
style_prefix "check"
label _("Requires Restart")
textbutton _("Enable Forward-Scroll Movement") action ToggleVariable("persistent.scroll", True, False)
textbutton _("Enable Forward-Scroll Movement") action [Function(onclick_audio, persistent.scroll), ToggleVariable("persistent.scroll", True, False)]
vbox:
style_prefix "check"
label _("Skip")
textbutton _("Unseen Text") action Preference("skip", "toggle")
textbutton _("After Choices") action Preference("after choices", "toggle")
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))
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)]
## Additional vboxes of type "radio_pref" or "check_pref" can be
## added here, to add additional creator-defined preferences.
@ -1148,10 +1177,10 @@ screen extrasnavigation():
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
[
[ "Help", ShowMenu("help") ],
[ "About", ShowMenu("about") ],
[ "Updates", ShowMenu("updates") ],
[ "About", ShowMenu("about") ],
[ "Updates", ShowMenu("updates") ],
[ "Gallery", ShowMenu("cg_gallery_0") ],
[ "Return", ShowMenu("main_menu") ]
[ "Return", ShowMenu("main_menu") ]
] )
## Help screen #################################################################
@ -1222,7 +1251,7 @@ screen keyboard_help():
hbox:
label _("Escape")
text _("Accesses the game menu.")
text _("Accesses the game menu. Also escapes the Gallery.")
hbox:
label _("Ctrl")
@ -1265,7 +1294,7 @@ screen mouse_help():
hbox:
label _("Right Click")
text _("Accesses the game menu.")
text _("Accesses the game menu. Also escapes the Gallery.")
hbox:
label _("Mouse Wheel Up\nClick Rollback Side")
@ -1366,8 +1395,8 @@ screen confirm(message, yes_action, no_action):
xalign 0.5
spacing 150
textbutton _("Yes") action yes_action
textbutton _("No") action no_action
textbutton _("Yes") activate_sound "audio/ui/uiClick.wav" action yes_action
textbutton _("No") activate_sound "audio/ui/uiBack.wav" action no_action
## Right-click and escape answer "no".
key "game_menu" action no_action
@ -1666,9 +1695,9 @@ screen extrasnavigation(): #Updates are removed (not even supported by Ren'Py)
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
[
[ "Help", ShowMenu("help") ],
[ "About", ShowMenu("about") ],
[ "About", ShowMenu("about") ],
[ "Gallery", ShowMenu("cg_gallery_0") ],
[ "Return", ShowMenu("main_menu") ]
[ "Return", ShowMenu("main_menu") ]
] )
style radio_button:

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
else:
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']):
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:
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:
textbutton _("End Replay") action EndReplay(confirm=True)
textbutton _("End Replay") activate_sound "audio/ui/uiBack.wav" action EndReplay(confirm=True)
elif not main_menu:
textbutton _("Main Menu") action MainMenu()
textbutton _("Main Menu") activate_sound "audio/ui/uiBack.wav" action MainMenu()
transform:
zoom 0.95
@ -248,6 +248,7 @@ screen view_image(item, _origin, zoom = zoom_arr.index(1.0), flag='a'):
tag menu
key "game_menu" action _origin
key "button_alternate" action _origin
# mousewheel & insert+delete
if (ALLOW_ZOOM):
@ -284,7 +285,7 @@ screen view_image(item, _origin, zoom = zoom_arr.index(1.0), flag='a'):
[ "-", zoom_b_f ],
[ "Return", zoom_b_f ]
] )
else:
elif renpy.variant("small"):
use quick_buttons("gui/button/uioptionbuttons/template_idle.png",
[
[ "Return", _origin ]

View File

@ -10,6 +10,10 @@ screen mod_menu_button(filename, label, function):
xmaximum 600
ymaximum 129
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:
add filename xalign 0.5 yalign 0.5 zoom 0.9
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 34