mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 09:16:56 +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)
|
||||
else:
|
||||
add Null(30,30) at truecenter
|
||||
|
||||
# Enablin/disabling mods button
|
||||
button:
|
||||
at truecenter
|
||||
|
@ -762,16 +763,18 @@ screen mod_menu():
|
|||
if not renpy.variant(["mobile", "steam_deck"]):
|
||||
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
|
||||
|
||||
if persistent.enabled_mods[i][1]:
|
||||
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"))
|
||||
else:
|
||||
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"))
|
||||
if x["Scripts"]:
|
||||
action Function(toggle_persistent_mods, i)
|
||||
activate_sound "audio/ui/snd_ui_click.wav"
|
||||
if persistent.enabled_mods[i][1]:
|
||||
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"))
|
||||
else:
|
||||
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"))
|
||||
|
||||
|
||||
# Move mod down button
|
||||
if i!=len(mod_menu_metadata)-1:
|
||||
|
|
Loading…
Reference in a new issue