How do I detect when the user clicks the 'OK' button?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Shemira

I have this Confirmation Dialog and I want to detect when the user clicks the ‘OK’ button. How would I do that? Is there a method for detecting user input on the ‘OK’ button?

:bust_in_silhouette: Reply From: tastyshrimp

The Button emits a signal whenever it is pressed, you just have to connect to it, here is the link to the docs.
You can check the timer example on how to work with signals.

Never mind, I figured it out. Thanks for the help! This is the first time I have used signals.

Shemira | 2019-12-26 20:10