Sha256: 361237c9823341f5dfdc96fa04060a8c80b68cff539a51248250159196fbbccf

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

puts "This very crude menu is also EXPERIMENTAL."
puts "At the moment, it only works inside STDSCR!\n"
puts "It knows up, down, Enter, and Escape.\n "
puts "Press any key to display the menu..."
getch

days = %w[Monday Tuesday Wednesday Thursday Friday]
picked = RubyText.menu(c: 30, items: days)

if picked.nil?
  puts "You picked nothing!"
else
  puts "You picked item #{picked} which is #{days[picked].inspect}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubytext-0.0.39 examples/prog21.rb
rubytext-0.0.38 examples/prog21.rb