about summary refs log tree commit diff stats
path: root/code/draw.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-06-29 01:45:48 +0200
committerhut <hut@lavabit.com>2009-06-29 01:45:48 +0200
commit75c3d3dc6fc97501a1c13643682fd732b316a559 (patch)
treecadb07dea5e839cc7f056ad713c25245d4914993 /code/draw.rb
parent2f41a544771c0fcaf8abfee963063ba212204d17 (diff)
downloadranger-75c3d3dc6fc97501a1c13643682fd732b316a559.tar.gz
bars fixed
1. colors wouldn't display correctly, because  used color_at instead of attr_at.
2. x did not terminate the bar process because of a call to a nonexistant method.
3. added proper colorscheme support
Diffstat (limited to 'code/draw.rb')
-rw-r--r--code/draw.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/code/draw.rb b/code/draw.rb
index 5a6380e7..693b941b 100644
--- a/code/draw.rb
+++ b/code/draw.rb
@@ -298,18 +298,19 @@ module Fm
 	end
 
 	def self.draw_bars()
-		@bars.each_with_index do |bar, ix|
+		l = CLI.lines
+		@bars.each do |bar|
 			bar.update
 
-			l = -ix - 1
+			l -= 1
 			puti l, bar.text[0..cols-1].ljust(cols)
 			done = bar.done
 			c = (done * cols).to_i
 			unless done == 0
-#				color_at l, 0, c, 0, 4
+				attr_at(l, 0, c, *Color.bar_done)
 			end
 			unless done == cols
-#				color_at l, c, -1, 0, 6
+				attr_at(l, c, -1, *Color.bar_undone)
 			end
 		end
 	end