1 # $Id: playlist_item.rb 9 2005-04-24 15:44:54Z tilman $
3 TEXT_COLOR_HILIGHT = "#f0fafd"
5 EDJE.collection("playlist_item") do |c|
8 ["title", "length"].each do |name|
9 c.part(name, :text) do |p|
12 {"default" => TEXT_COLOR,
13 "selected" => TEXT_COLOR_HILIGHT}.each do |(state, color)|
14 p.description(state) do |d|
16 d.outline_color = OUTLINE_COLOR
18 d.font = "fonts/acknowledge2.ttf"
20 d.text = "Dark Tranquillity - Through Smudged Lenses"
27 ["default", "selected"].each do |state|
28 c.part("length").description(state) do |d|
34 ["selected", "unselected"].each do |state|
35 c.program("playlist_item.#{state}", :set_state) do |p|
36 p.signal = "PLAYLIST_ITEM_#{state.upcase}"
37 p.state = state == "unselected" ? "default" : state
38 p.mode = state == "selected" ? :accelerate : :decelerate
40 p.targets << ProgramTarget.new(c.part("title"))
41 p.targets << ProgramTarget.new(c.part("length"))