Closed djcas9 closed 8 years ago
In gocui, the last created view is always on top of the existing ones. Some time ago, I was considering to allow setting the view's z-position, but most of the time this is not needed and only adds complexity. For instance, the most common case of overlapping views is when you want to show a dialog, which is already supported with the current design.
@jroimartin here is my usecase - building an irssi type clone in go https://github.com/mephux/komanda-cli - keeping the views in my case lowers the complexity.
So is the only work around deleting the view and recreating it? Or is it possible to move the view or resize it to 1x1 px.?
I added *Gui.SetViewOnTop
to support this use-case. You can check it on branch view-on-top commit 2defea8aed70d401b46e7738879a3ed8e81d83e3. Let's see if it works for your use case.
However, I wouldn't like to add much more complexity regarding z-position. With this patch, a view will be on top when:
*Gui.SetViewOnTop
is called with that view as argument.@jroimartin That works great - thank you.
Cool! Merged on master.
Is this possible ATM with multiple windows with the same demolitions?