Sha256: 3de8a3c76fac380714c553171c107a3deb26dcbd42c896702f7a806c482d13f2

Contents?: true

Size: 623 Bytes

Versions: 22

Compression:

Stored size: 623 Bytes

Contents

STDSCR.scrolling(true)

puts "We use #scrolling to turn the scrolling feature on or off"
puts "for any window (including STDSCR). It's off by default."

win2 = RubyText.window(6, 50, r: 6, c: 29, fg: Blue, bg: Black)
win2.puts "\nThis is\njust some more\nrandom text..."
win2.scrolling(true)

puts "\nNote that we can scroll up or down... but there is no \"buffer\" for text."
sleep 3
3.times { win2.scroll(1); sleep 0.2 };  sleep 1
3.times { win2.scroll(-1); sleep 0.2 }; sleep 4

puts "\nNOTE: If you scroll STDSCR, other windows will disappear! This may be fixed later."
sleep 3
3.times { STDSCR.scroll(-1); sleep 0.2 }

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rubytext-0.1.29 examples/scrolling.rb
rubytext-0.1.28 examples/scrolling.rb
rubytext-0.1.26 examples/scrolling.rb
rubytext-0.1.25 examples/scrolling.rb
rubytext-0.1.23 examples/scrolling.rb
rubytext-0.1.22 examples/scrolling.rb
rubytext-0.1.21 examples/scrolling.rb
rubytext-0.1.20 examples/scrolling.rb
rubytext-0.1.19 examples/scrolling.rb
rubytext-0.1.18 examples/scrolling.rb
rubytext-0.1.17 examples/scrolling.rb
rubytext-0.1.16 examples/scrolling.rb
rubytext-0.1.15 examples/scrolling.rb
rubytext-0.1.14 examples/scrolling.rb
rubytext-0.1.13 examples/scrolling.rb
rubytext-0.1.12 examples/scrolling.rb
rubytext-0.1.11 examples/scrolling.rb
rubytext-0.1.10 examples/scrolling.rb
rubytext-0.1.8 examples/scrolling.rb
rubytext-0.1.7 examples/scrolling.rb