Bookwyrm β€” development thread - Programming On Unix

Users browsing this thread: 3 Guest(s)
Tmplt
Long time nixers
After a few days tinkering with why set_menu_items() would some times segfault when using an intermediate std::vector to add new entries to the menu, I got fed up with Ncurses and decided to try termbox instead.

With termbox, the terminal is just a big pixel canvas. You use tb_change_cell() to alter a single character on it, and then print the changes out with tb_present(). Making a simple menu wasn't as troublesome as I thought it would be. As it looks now, I'll keep using it. Hopefully it's portable enough.

Here is an aciinema of the initial menu implementation in action: https://asciinema.org/a/wTiIdEBvd58x4hX9adk9rTaii

Entries prefixed with '2' is from a second Python source script (and thus thread).


Messages In This Thread
Bookwyrm β€” development thread - by Tmplt - 13-04-2017, 03:22 PM
RE: Bookwyrm β€” development thread - by Tmplt - 27-05-2017, 02:45 PM
RE: Bookwyrm β€” development thread - by venam - 28-05-2017, 07:02 AM
RE: Bookwyrm β€” development thread - by Tmplt - 28-05-2017, 09:26 AM
RE: Bookwyrm β€” development thread - by Tmplt - 09-06-2017, 09:28 PM
RE: Bookwyrm β€” development thread - by Tmplt - 19-06-2017, 05:45 PM
RE: Bookwyrm β€” development thread - by Tmplt - 07-08-2017, 07:44 PM
RE: Bookwyrm β€” development thread - by Tmplt - 12-01-2018, 08:16 AM
RE: Bookwyrm β€” development thread - by Tmplt - 12-01-2018, 07:40 PM
RE: Bookwyrm β€” development thread - by Tmplt - 24-02-2018, 08:48 AM
RE: Bookwyrm β€” development thread - by Tmplt - 05-05-2018, 08:50 AM
RE: Bookwyrm β€” development thread - by Tmplt - 11-05-2018, 07:59 PM
RE: Bookwyrm β€” development thread - by Tmplt - 27-05-2018, 06:17 PM
RE: Bookwyrm β€” development thread - by Tmplt - 26-12-2018, 10:18 PM