Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

In engine, you can probably use

func _notification(what):      
    if what == NOTIFICATION_WM_CLOSE_REQUEST:       
        # Code to handle close request

or something like that.