pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping

Home Page:https://pthom.github.io/hello_imgui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pre-exit behavior

Guillaume227 opened this issue · comments

I am looking a way to have a confirmation dialog appear to ask the user whether they really want to close the app (e.g. because some changes might be lost).
The BeforeExit callback is called at a stage when there is no way back, more like a c++ destructor that you can use to clean-up resources but from which you cannot change your mind about leaving a context.

I would like to achieve that while reusing the default 'Quit' menu entry that ships with the App menu.

Is that a case for introducing a new callback? Or is there another way I have overlooked?