You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have called '. OpenPopup', but it cannot pass IsOpen to change its open state.
Is there any other way to close the Popup window except CloseCurrentPopup?
Code example
package main
import (
"github.com/AllenDang/giu"
)
var (
closeSign bool = false
)
func main() {
wnd := giu.NewMasterWindow("Popup Example", 400, 300, 0)
wnd.Run(loop)
}
func loop() {
var pop *giu.PopupModalWidget
pop = giu.PopupModal("modal").Layout(
giu.Label("This is a modal popup."),
giu.Button("Close").OnClick(func() {
// giu.CloseCurrentPopup()
pop.IsOpen(&closeSign)
giu.Update()
}),
)
giu.SingleWindow().Layout(
giu.Button("Open Modal Popup").OnClick(func() {
giu.OpenPopup("modal")
}),
pop,
)
}
To Reproduce
Run my demo
will see the crash...
Version
master
OS
Windows 10,go 1.23.3,giu v0.11.0
The text was updated successfully, but these errors were encountered:
@ayayStay sorry for late reply.
Popups mechanism is a bit tricky in giu (and imgui as well).
We have a wiki section about it... well... We will have in a second... FOr now the whole popups thing is hidden in FAQ section of our wiki and somewhere here in issues.
Gimma a second and I'll get back with a wiki link 😄
What happend?
I have called '. OpenPopup', but it cannot pass IsOpen to change its open state.
Is there any other way to close the Popup window except CloseCurrentPopup?
Code example
To Reproduce
Version
master
OS
Windows 10,go 1.23.3,giu v0.11.0
The text was updated successfully, but these errors were encountered: