ConfirmationDialog close event

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

I have a ConfirmationDialog with two buttons.

When the user presses the Ok button I save the changes through the confirmed signal.
When the user presses the Cancel button I discard the GUI changes through the pressed signal of the button.
But when the user just closes the window, the popup_hide signal is fired before the buttons, so I can’t tell if I am allowed to discard the changes.

Alternatively, is there a way to get rid of the window upper border whatsoever to prevent the user from just closing the window?

:bust_in_silhouette: Reply From: Trider

My bad, the WindowDialog has GetCloseButton() method.

Thanks for the answer.

molesallegiance | 2022-10-16 12:08