diff --git a/ui/overlays.go b/ui/overlays.go index 3fd96ad..40ae4cc 100644 --- a/ui/overlays.go +++ b/ui/overlays.go @@ -88,9 +88,7 @@ func (o *Overlays) Handle(ctx Context, e Event) bool { return o.Proxy.Handle(ctx, e) } -func (o *Overlays) Hide(name string) { - o.visible[name] = false -} +func (o *Overlays) Hide(name string) { o.SetVisibility(name, false) } func (o *Overlays) Render(ctx Context) { o.Proxy.Render(ctx) @@ -105,4 +103,4 @@ func (o *Overlays) SetVisibility(name string, visible bool) { o.setVisibility(na func (o *Overlays) Show(name string) { o.SetVisibility(name, true) } -func (o *Overlays) Toggle(name string) { o.SetVisibility(name, false) } +func (o *Overlays) Toggle(name string) { o.SetVisibility(name, !o.visible[name]) }