81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
# File 'lib/ektoplayer/views/playinginfo.rb', line 81
def draw
@win.erase
draw_position_and_length
if ICurses.colors == 256
top_format = Config[:'playinginfo.format_top_256']
bottom_format = Config[:'playinginfo.format_bottom_256']
else
top_format = Config[:'playinginfo.format_top']
bottom_format = Config[:'playinginfo.format_bottom']
end
if @track
fill(top_format).each_with_index do |fmt,i|
@win.center(fmt[:sum]) if i == 0
@win.attrset(UI::Colors.set(nil, *fmt[:curses_attrs]))
@win << fmt[:filled]
end
@win.attrset(Theme[:'playinginfo.state'])
@win.from_right(@state.to_s.size + 2) << "[#{@state}]"
@win.next_line
fill(bottom_format).each_with_index do |fmt,i|
@win.center(fmt[:sum]) if i == 0
@win.attrset(UI::Colors.set(nil, *fmt[:curses_attrs]))
@win << fmt[:filled]
end
else
@win.attrset(0)
@win.center_string(STOPPED_HEADING)
@win.attrset(Theme[:'playinginfo.state'])
@win.from_right(9) << '[stopped]'
end
end
|