Sha256: 27e18b3ee7b403a92b910b6f5bfb5b12fd7a819b1baf67649e3a4659d90062d5

Contents?: true

Size: 630 Bytes

Versions: 27

Compression:

Stored size: 630 Bytes

Contents

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

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

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

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

Version data entries

27 entries across 27 versions & 1 rubygems

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