Sha256: c2e15f9b176d70d8fe15a79f7eb667193ebccb7044bcea495bd5822c1bf95cca
Contents?: true
Size: 487 Bytes
Versions: 3
Compression:
Stored size: 487 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, title: "Which day?", 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubytext-0.0.89 | examples/prog21.rb |
rubytext-0.0.88 | examples/prog21.rb |
rubytext-0.0.87 | examples/prog21.rb |