giu
giu copied to clipboard
widgets/popupmodal: creating popup with the same id two times causes connecting its layouts
related with #288
when creating two popups with the same id, they layouts are joined and rendered together. see demo code:
package main
import "github.com/AllenDang/giu"
func loop() {
const id = "popupid"
giu.SingleWindow().Layout(
giu.Button("Open").OnClick(func() { giu.OpenPopup(id) }),
giu.PopupModal(id).Layout(giu.Label("label 1")),
giu.PopupModal(id).Layout(giu.Label("label 2")),
)
}
func main() {
wnd := giu.NewMasterWindow("msgbox-demo", 640, 480, 0)
wnd.Run(loop)
}

is it a bug or thats just a feature? :grinning:
It is the design of imgui.
@AllenDang so it isn't a bug?
@gucio321 It is a bug for upstream.
Sr forgot about this issue 😊. Will try to reproduce in plain c++ version and report