4 ms·
I do not know rust, but this cannot possibly be as bad as curses :) I wish there was a simple Text Form Library (not OO) that would read a screen description f
by jmclnx 4y ago
I do not know rust, but this cannot possibly be as bad as curses :)
I wish there was a simple Text Form Library (not OO) that would read a screen description file and generate/process a 80x24 screen.
Something like:
Column,row,length,Text Description,field-type (character, integer, float).
On MS-DOS I had an C compiler that used had a form of printf for this purpose, one line per printf. I used those printfs to kind of create a format text file like above.
- fnordpiglet 4y agoTUI is a really great immediate mode library for basic display oriented (not as much on interactivity) applications. It provides non obvious capabilities like charting, etc. The original developer got a real job and it languished for a large part of 2022 and was recently handed over to the community managed by a new GitHub org. There are several other TUI frameworks in rust that are pretty good, but for my work this is the simplest to hack out something that looks really good really fast.
- saulpw 4y agoI was trying this with VisiData and the DarkDraw[0] .ddw format, which is JSON and similar structure to what you describe. The problem is that 80x24 is no longer an adequate terminal size, and so simplistic row/column layouts like this can't work to make the form look good. You need "center this text" and a way to put multiple buttons in reasonable places. You could use floats as column/row to indicate fractional position within the window; but then these still need to be the center of the element, and not the start, for it to look good. [0] https://github.com/devottys/darkdraw https://github.com/devottys/darkdraw