Giter VIP home page Giter VIP logo

Comments (5)

jroimartin avatar jroimartin commented on May 11, 2024

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.

from gocui.

djcas9 avatar djcas9 commented on May 11, 2024

@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.?

from gocui.

jroimartin avatar jroimartin commented on May 11, 2024

I added *Gui.SetViewOnTop to support this use-case. You can check it on branch view-on-top commit 2defea8. 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:

  • It's created.
  • *Gui.SetViewOnTop is called with that view as argument.

from gocui.

djcas9 avatar djcas9 commented on May 11, 2024

@jroimartin That works great - thank you.

from gocui.

jroimartin avatar jroimartin commented on May 11, 2024

Cool! Merged on master.

from gocui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.