-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Popups workaround #565
Labels
documentation
Improvements or additions to documentation
Comments
okey, while working on constitutor I finally found it: THE
|
and one more thing: popupModals cannot be definied inside MenuWidget, why? |
ok, another imporvement - I baypassed imgui at all ;-) package app
import (
"github.com/AllenDang/giu"
)
type PopupModal struct {
id string
popup *giu.PopupModalWidget
isOpenInGiu bool
isOpen bool
}
func NewPopupModal(id string) *PopupModal {
return &PopupModal{
id: id,
popup: giu.PopupModal(id),
isOpen: false,
}
}
func (p *PopupModal) Open() {
p.isOpen = true
}
func (p *PopupModal) Close() {
p.isOpen = false
}
func (p *PopupModal) Layout(l ...giu.Widget) *PopupModal {
p.popup.Layout(l...)
return p
}
func (p *PopupModal) Build() {
if !p.isOpen {
return
}
p.popup.IsOpen(&p.isOpen).Build()
if !p.isOpenInGiu {
giu.OpenPopup(p.id)
}
} |
Closed
will be added on wiki in FAQ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
I'm trying to make a PopupModal widget and... (again) I met an issue
cpde:
what is wrong?
The text was updated successfully, but these errors were encountered: