1 ($:.unshift File.expand_path(File.join( File.dirname(__FILE__), '..', 'lib' ))).uniq!
5 # This example shows you how to utilize an Nfoiled `Window` to accept input.
7 # Creating our first `Window` should take care of initializing the Nfoiled
8 # system for us. However, the `Ncurses.LINES` and `Ncurses.COLS` methods won't
9 # be defined until the system is initialized, so we have to prime it.
11 output = Nfoiled::Window.new :height => ::Ncurses.LINES - 1
12 input = Nfoiled::Window.new :top => ::Ncurses.LINES - 1, :height => 1
14 output.puts "Type characters to have them printed! (^C to exit)"
18 # Now we'll print each key to the output as it is typed into the input.
20 output.print key.char.to_s + " "