mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-02-02 06:46:34 +01:00
make the mod toggle button disappear if the mod doesn't have any valid scripts loaded
This commit is contained in:
parent
5eb39a7c3c
commit
b1719c4b21
1 changed files with 11 additions and 8 deletions
|
@ -753,6 +753,7 @@ screen mod_menu():
|
||||||
action Function(swapMods, i, i-1)
|
action Function(swapMods, i, i-1)
|
||||||
else:
|
else:
|
||||||
add Null(30,30) at truecenter
|
add Null(30,30) at truecenter
|
||||||
|
|
||||||
# Enablin/disabling mods button
|
# Enablin/disabling mods button
|
||||||
button:
|
button:
|
||||||
at truecenter
|
at truecenter
|
||||||
|
@ -762,10 +763,11 @@ screen mod_menu():
|
||||||
if not renpy.variant(["mobile", "steam_deck"]):
|
if not renpy.variant(["mobile", "steam_deck"]):
|
||||||
ysize 65
|
ysize 65
|
||||||
|
|
||||||
action Function(toggle_persistent_mods, i)
|
|
||||||
activate_sound "audio/ui/snd_ui_click.wav"
|
|
||||||
add "gui/button/menubuttons/checkbox.png" xalign 0.5 yalign 0.5
|
add "gui/button/menubuttons/checkbox.png" xalign 0.5 yalign 0.5
|
||||||
|
|
||||||
|
if x["Scripts"]:
|
||||||
|
action Function(toggle_persistent_mods, i)
|
||||||
|
activate_sound "audio/ui/snd_ui_click.wav"
|
||||||
if persistent.enabled_mods[i][1]:
|
if persistent.enabled_mods[i][1]:
|
||||||
idle_foreground Transform("gui/button/menubuttons/check.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#00ff40"))
|
idle_foreground Transform("gui/button/menubuttons/check.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#00ff40"))
|
||||||
hover_foreground Transform("gui/button/menubuttons/check.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#ffffff"))
|
hover_foreground Transform("gui/button/menubuttons/check.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#ffffff"))
|
||||||
|
@ -773,6 +775,7 @@ screen mod_menu():
|
||||||
idle_foreground Transform("gui/button/menubuttons/cross.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#db1a1a"))
|
idle_foreground Transform("gui/button/menubuttons/cross.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#db1a1a"))
|
||||||
hover_foreground Transform("gui/button/menubuttons/cross.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#ffffff"))
|
hover_foreground Transform("gui/button/menubuttons/cross.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#ffffff"))
|
||||||
|
|
||||||
|
|
||||||
# Move mod down button
|
# Move mod down button
|
||||||
if i!=len(mod_menu_metadata)-1:
|
if i!=len(mod_menu_metadata)-1:
|
||||||
button:
|
button:
|
||||||
|
|
Loading…
Reference in a new issue