Permalink
Browse files

merged

  • Loading branch information...
2 parents 06a79e3 + e6bed71 commit 3e066466871f88a21c46da591b6979d1b769007d @oneup oneup committed Oct 2, 2008
Showing with 3 additions and 2 deletions.
  1. +2 −2 console.rb
  2. +1 −0 main.rb
View
@@ -65,7 +65,7 @@ def self.color=(arg) # colorize a string
if arg.length > 2
arg[2] = bg_color[arg[2]] # background color
end
- print "\e[" + arg.join(";") + "m" # magic ansi
+ print "\e[#{arg[0]};#{arg[1]}m" # magic ansi
# escape sequence
end
@@ -125,6 +125,6 @@ def self.position=(*arg)
if arg.length > 1
col = arg[1]
end
- Kernel.print "\e[" + row.to_s + ";" + col.to_s + "H"
+ print "\e[" + row.to_s + ";" + col.to_s + "H"
end
end
View
@@ -5,6 +5,7 @@
Console.clear
+
"hello\n".color :normal, :red, :bg_white # prints automatically good!?
print Cursor.position.join(", ")

0 comments on commit 3e06646

Please sign in to comment.