Looks like the flags for the ImGui Popup are not working. If I use the help patch “HowTo Popup.vl”, you can see that changing the flags does not change anything.
This is in 6.6. Thanks for fixing!
Looks like the flags for the ImGui Popup are not working. If I use the help patch “HowTo Popup.vl”, you can see that changing the flags does not change anything.
This is in 6.6. Thanks for fixing!
Hi Seltzdesign,
good find, thank you!
It is fixed in the previews >= 6.7-248.
Best,
Anton
@robotanton Oh, I noticed that the Popup (Modal) still has the same issue. The flags are not doing anything.
Thanks for fixing those as well!
Tested in 6.7-290.
Hello,
The Popup (Modal) is a bit different. It’s flags are working when there is a Channel connected to the Closing
. This is due to how overloads are defined in the ImGui. I guess we have to add this info to the helppatch if it’s missing there.
Hope this helps and works for you.
Anton
Okay, I finally got around to testing it with the Popup (Modal) and a Channel connected to closing. Then the flags do indeed work, but the popup has the same layout bug as the normal Popup.
As soon as I adjust the size or position of it, it messes with the position of all top level ImGUI windows. As soon as I resize the vvvv window slightly, ImGui recalculates everything and it is correct again. But if I trigger something like a tab change, where ImGui internally most likely does some recalculation again, it is all messed up again.
I hope its visible in the .gif.
It must be something with the way the position of the windows is set that is broken, whenever a popup is around.
I will once again try to make a sample patch of it.
I have created a minimal example with all of the application removed and most of the UI.
I basically have 5 ImGUI windows that I calculate the position and size for, so they are next to each other like columns and resize if I resize the window.
There are a bunch of comboboxes, each with a small button next to it, which opens a popup with other controls in it.
If you switch a tab, all the ImGui windows AFTER that will have their position set to the position of the popup. If you resize the window slightly the calculated layout is applied again.
imgui_bug.vl (651.1 KB)
Tested in 6.7-0290
Yes, I’ve had the same problem several times too, with all popups. My workaround is (until it is fixed): place all popups at the very end of the Context chain, then they don’t interfere with the layout.
Hope this helps,
Anton
@robotanton Okay, so its a known bug in ImGUI?
I could try to have just 1 popup at the very end of the chain and hand it the correct channels depending on what button was clicked on. Reasonably only 1 popup can be open at a time.
Of course it would be much cleaner and more sensible if the popup is next to the button that triggers it, also in code, but if that’s the only way.
So no fix possible?
Okay, so the workaround is working now. For each button that can open the popup I set a channel with the position and channel path of the triggering button. Then in the popup I get the global channel by path and set the position relative to the triggering button.
Works great now and no more layout problems! I’m really starting to love the (global) channel stuff :)
Would be great if it was fixed, but it also looks like quite a nasty bug to track down, because it is so specific.
At least it also kind of makes sense from a UI design perspective, since you can think of the popup like a layer that needs to be on top of everything else, so having it right at the end kind of makes sense.
Here they are in action :)
I added a small calculation, so the position of the popup changes if it gets close to the edges. I know ImGUI already prevents stuff from bleeding off the edges, but that way I can position it really properly around the button.
#designerocd #pixelperfect
Hi seltzdesign,
although popups/modals still should be rendered at the end of the context chain, there was a bug, that messed up the layout. It should be fixed in the previews >= 7.0-3.
Best,
Anton