Sha256: 44abd14b57ba2f83183354ca2f3d5a3caf737a2c132177ce16cc5aab1fdff95b

Contents?: true

Size: 662 Bytes

Versions: 11

Compression:

Stored size: 662 Bytes

Contents

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

fg, bg = White, Blue
win = RubyText.window(9, 65, 2, 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", effect(Yellow), " another color ", 
          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

11 entries across 11 versions & 1 rubygems

Version Path
rubytext-0.0.84 examples/prog20.rb
rubytext-0.0.83 examples/prog20.rb
rubytext-0.0.82 examples/prog20.rb
rubytext-0.0.81 examples/prog20.rb
rubytext-0.0.80 examples/prog20.rb
rubytext-0.0.79 examples/prog20.rb
rubytext-0.0.78 examples/prog20.rb
rubytext-0.0.77 examples/prog20.rb
rubytext-0.0.76 examples/prog20.rb
rubytext-0.0.75 examples/prog20.rb
rubytext-0.0.74 examples/prog20.rb