From 75c3d3dc6fc97501a1c13643682fd732b316a559 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 29 Jun 2009 01:45:48 +0200 Subject: 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 --- code/draw.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'code/draw.rb') 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 -- cgit 1.4.1-2-gfad0