msgbox: workaround for n-call of PrepareMsgbox (fix #288)
I'm thinking about to refine the whole concept of Popup. This is the most tricky part of imgui from my point of view. Mostly the rule 'popup could only be opened by the invoker who is defined at the same widget hierarchy'. It's very confusing. It makes me feels very hard to understand why popup doesn't work at the begining of learning imgui.
I have few thoughts here:
- The popup should be defined at very certain position, rather than random layout in random widget hierarchy.
- If two popups get same id, both of them should be opened, rather than merging their body.
The popup should be defined at very certain position, rather than random layout in random widget hierarchy.
what do you mean? what could the demo code look like?
If two popups get same id, both of them should be opened, rather than merging their body.
sure, the other option is to disable such the solution - all popups should be its unique id - no duplicates else - panic
@gucio321 The popup should be defined at very certain position, rather than random layout in random widget hierarchy.
I mean, for example, we have a method in window widget named Popups, where is the only place to define popup.
hmm, @AllenDang I just got an idea.
Maybe for now, change PopupModal() function name to RegisterPopupModal? Then, everyone'll know that this method doesn't actually make popup appear but just add it to the system?
@AllenDang what should I do with this? close?
@gucio321 Let's leave it here as a reminder to refine Popup related code in future.
closing, as #288 exists