Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

widgets/popupmodal: creating popup with the same id two times causes connecting its layouts #290

Open
gucio321 opened this issue Aug 21, 2021 · 4 comments
Labels
External Issue Issue in dependencies - can't make progress in giu yet.

Comments

@gucio321
Copy link
Collaborator

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)
}

image

is it a bug or thats just a feature? 😀

@AllenDang
Copy link
Owner

It is the design of imgui.

@gucio321
Copy link
Collaborator Author

@AllenDang so it isn't a bug?

@AllenDang
Copy link
Owner

@gucio321 It is a bug for upstream.

@gucio321
Copy link
Collaborator Author

Sr forgot about this issue 😊. Will try to reproduce in plain c++ version and report

@gucio321 gucio321 added the External Issue Issue in dependencies - can't make progress in giu yet. label May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Issue Issue in dependencies - can't make progress in giu yet.
Projects
None yet
Development

No branches or pull requests

2 participants