On our map editor class, we made a close button and assigned it to show the confirmation alert (that makes sure if user wants to save or discard the project) when clicked and behave accordingly. However, I don't know how to make confirmation alert to pop up when a user clicks exit button(the red x to close the window on top).