Sha256: c36d79e81b5ef4010b52aa2d7ea40c3b3201d95b972ec2b6e8ecf024e9210bbd

Contents?: true

Size: 745 Bytes

Versions: 42

Compression:

Stored size: 745 Bytes

Contents

puts "\n Methods such as go, rcprint, and putch \n can accept symbols such as"
puts " :top :bottom :left :right :center"
puts "\n Of course, printing starting at the far right \n can be problematic."

win = RubyText.window(7, 29, r: 1, c: 60, fg: Red, bg: Black)

win.putch "1", r: :bottom, c: :left;                 sleep 0.4
win.go :center, :left;               win.puts "abc"; sleep 0.4
win.go :top, :left;                  win.puts "def"; sleep 0.4
win.rcprint :top, :center, "4";                      sleep 0.4

others = [[:top, :right, "5"], [:center, :right, "6"], [:bottom, :right, "7"], 
          [:bottom, :center, "8"], [:center, :center, "9"]] 
others.each do |args| 
  r, c, ch = *args
  win.go r,c
  win.putch(ch)
  sleep 0.4
end

Version data entries

42 entries across 42 versions & 1 rubygems

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