Sha256: a0ad2bdf43535ecb04f049c0648877f8cfd6019905ccbb22b1e0fcc889e51968

Contents?: true

Size: 663 Bytes

Versions: 15

Compression:

Stored size: 663 Bytes

Contents

def effect(*args) # find better way
  RubyText::Effects.new(*args)
end

fg, bg = White, Blue
win = RubyText.window(9, 65, r: 2, c: 26, fg: fg, bg: bg)

win.puts "This is EXPERIMENTAL (and BUGGY)."
win.puts "Use an \"effect\" to change the text color or \"look\":"

win.puts "This is", fx(" another color ", Yellow),
          effect(White), "and yet another."
win.puts "We can ", effect(:bold), "boldface ",
         "and ", effect(:reverse), "reverse ",
         "and ", effect(:under), "underline ",
         effect(:normal), "text at will.\n "
win.puts "This is ", effect(:bold, Red), "bold red ", 
         effect(:normal, fg), "and this is normal again.\n "

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rubytext-0.0.99 examples/effects.rb
rubytext-0.0.98 examples/effects.rb
rubytext-0.0.97 examples/effects.rb
rubytext-0.0.96 examples/effects.rb
rubytext-0.0.95 examples/effects.rb
rubytext-0.0.94 examples/effects.rb
rubytext-0.0.93 examples/effects.rb
rubytext-0.0.92 examples/effects.rb
rubytext-0.0.91 examples/effects.rb
rubytext-0.0.90 examples/effects.rb
rubytext-0.0.89 examples/prog20a.rb
rubytext-0.0.88 examples/prog20a.rb
rubytext-0.0.87 examples/prog20a.rb
rubytext-0.0.86 examples/prog20a.rb
rubytext-0.0.85 examples/prog20a.rb