zntg/ui/overlayproxy.go
Sander Schobers 9af85d79a6 Added callbacks & events when visibility of an overlay changes.
Added proxy that proxies overlay callbacks as well (on top of control callbacks).
2020-05-16 10:12:54 +02:00

20 lines
282 B
Go

package ui
type OverlayProxy struct {
Proxy
}
func (p *OverlayProxy) OverlayShown() {
overlay, ok := p.Content.(Overlay)
if ok {
overlay.OverlayShown()
}
}
func (p *OverlayProxy) OverlayHidden() {
overlay, ok := p.Content.(Overlay)
if ok {
overlay.OverlayHidden()
}
}