Can anybody point out how to properly use SensitiveIf() ?
I've currently got this, but it does nothing (including not throwing any errors)
Code: Select all
action [ShowMenu("save"), SensitiveIf(renpy.get_screen is not ("save") or renpy.get_screen is not ("MainMenu"))]
Code: Select all
action [ShowMenu("save"), SensitiveIf(not renpy.get_screen("save") or not renpy.get_screen("MainMenu"))]
In case it helps, I need something akin to action MainMenu(), where if it is on the screen it will send you to, you cannot focus the button. Currently, the following workaround does the trick, but I'd like a less clunky solution if possible.
Code: Select all
if not renpy.get_screen("save"):
imagebutton:
idle "images/Buttons & Graphics/Text Buttons/Save_Select_Off.png"
hover "images/Buttons & Graphics/Text Buttons/Save_Select_On.png"
action ShowMenu("save")
tooltip "Save your progress"
else:
imagebutton:
idle "images/Buttons & Graphics/Text Buttons/Save_Select_Off.png"
hover "images/Buttons & Graphics/Text Buttons/Save_Select_On.png"
action NullAction()
tooltip "Save your progress"