mabe02 / lanterna

Java library for creating text-based GUIs
GNU Lesser General Public License v3.0
2.26k stars 242 forks source link

Question: Possible to have a full-width, unpadded menu bar? #522

Closed io7m closed 3 years ago

io7m commented 3 years ago

Hello!

Is it possible to, instead of having a menu that looks like this:

menuOffset

... have a menu that looks like this:

menuOk

That is, the menu is the full width of the window and is rendered without the margin around the outside.

io7m commented 3 years ago

Here's a nice looking example from the abandoned Jexer library:

Jexer

mabe02 commented 3 years ago

Yes, but not completely out of the box. You can assign a MenuBar to the TextGUI's background pane and then use a custom renderer to customize the look. If you create additional windows, they might take focus and prevent accessing the menu through normals means, so you might have to listen to unhandled keystrokes and manually trigger the menu.

io7m commented 3 years ago

Interesting. Thank you!