Hello. Bear with me, I'm guessing at your question.
I think you are saying you made a Button
with Toggle Mode
on. This allows you to click it once for down, click again for up, a bit like a light switch. You need to connect
some code to the toggled()
signal, instead of the usual pressed
signal. The function you connect to will take a parameter, sort of like:
func on_Lightswitch_toggled(is_on: bool):
if is_on:
DarkenedOverlay.hide() # Lights are on, easy to see
else:
DarkenedOverlay.show() # No lights, look through the shadows
I hope this help. If it does, reply and let me know. Otherwise, please add some code to your question.