Reputation: 3576
I want to write a simple chat-client in Ruby for the terminal. The Problem is, that I need two separate "windows", one for the chatlog and another for the input prompt. I dont have a clue how to do this. I watched (n)curses and some other ruby-libs, but nothing gives me this functionality.
.------------------------------. | Mike: Hi Jenny | | Jenny: Hi Mike, how are you? | |------------------------------| |> I am fine_ | `------------------------------'
The big Problem is, if a new Line arives, the upper frame should scroll, but the prompt should stay on its position. And if I write something in the input prompt, the text should disappear when the user press ENTER.
Upvotes: 0
Views: 1370
Reputation: 14743
Well, ncurses (and its ruby binding library) does allow you for this since all the corresponding tools with windows(1)
, talk(1)
and screen(1)
are written with ncurses. You can have multiple windows with (n)curses.
Upvotes: 3