From: Takaaki Tateishi Date: 2001-12-04T13:28:00+09:00 Subject: [ruby-talk:27410] Re: Curses Hello, At Tue, 4 Dec 2001 04:01:33 +0900, Martin DeMello wrote: > Can anyone point me to Ruby/Curses example code? Also, a few specific > issues: They are at ext/curses in the source archive. > - What is crmode? I can't find it in the curses man pages crmode is an alias of cbreak. > - How does one access the arrow keys? > - Are colours implemented at all? The curses extension of ruby-1.7 provides those functions such as Window#attron, Curses.color_pair and Curses::KEY_LEFT. Here is an example code which shows how to deal with colors: win = Window.new(....) win.attron(color_pair(COLOR_RED)){ win.box(...) } and each colors must be initialized before like this: start_color init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLUE) init_pair(COLOR_RED, COLOR_RED, COLOR_RED) -- Takaaki Tateishi