test/raw_screen/display_colours.rb in ppcurses-0.1.1 vs test/raw_screen/display_colours.rb in ppcurses-0.1.2
- old
+ new
@@ -11,11 +11,11 @@
def print_value(value, text_color, bg_color)
pair_index = @index + 1
Curses.setpos(@y_loc, @x_loc)
Curses.init_pair(pair_index, text_color, bg_color)
- color_pair = color_pair(pair_index)
+ color_pair = Curses.color_pair(pair_index)
Curses.attron(color_pair)
out_string = "#{value}"
@x_loc = @x_loc + 5
if @x_loc > Curses.cols
@@ -32,10 +32,10 @@
def wait_for_key
for i in 0..255
- print_value("#{i}", COLOR_BLACK, i )
+ print_value("#{i}", 0, i )
end
Curses.getch