Sha256: 2610b59aa1bd28e602e13f86d7df1d4a4f4dbdab36d3262ff20901c3eb11de71

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

win = RubyText.window(10, 45, r: 1, c: 20, fg: Black, bg: Red)
win.puts "This very crude menu is also EXPERIMENTAL."
win.puts "It knows up, down, Enter, and Escape.\n "
win.puts "Press any key to display the menu..."
win.puts

getch

days = %w[Monday Tuesday Wednesday Thursday Friday]
num, day = RubyText.menu(win: win, r: 1, c: 5, items: days)

puts
if day.nil?
  win.puts "You picked nothing!"
else
  win.puts "You picked item #{num} which is #{day.inspect}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubytext-0.0.86 examples/prog21.rb
rubytext-0.0.85 examples/prog21.rb