-# $Id: multipass.rb 2 2005-04-23 13:23:58Z tilman $
+# $Id: multipass.rb 6 2005-04-24 09:36:27Z tilman $
require "src/slider.rb"
require "src/button.rb"
load "src/player-display-seeker.rb"
load "src/intro.rb"
load "src/player-overlay.rb"
+end
+
+EDJE.collection("playlist") do |c|
+ c.set_min(450, 150)
+
+ c.data["shaped"] = "true"
+
+ c.part("root", :rect) do |p|
+ p.mouse_events = false
+ p.description.color = "#00000000"
+ end
- c.part("playlist", :swallow)
+ load "src/playlist-background.rb"
end
EDJE.collection("playlist_item") do |c|
- c.part("length", :text)
- c.part("title", :text)
+ c.set_size(150, 10)
+
+ c.part("title", :text) do |p|
+ p.effect = :outline
+
+ p.description do |d|
+ d.color = TEXT_COLOR
+ d.outline_color = OUTLINE_COLOR
+
+ d.font = "fonts/acknowledge2.ttf"
+ d.font_size = 12
+ d.text = "Dark Tranquillity - Through Smudged Lenses"
+ d.set_text_align(0.0)
+ end
+ end
+
+ c.part("length", :text) do |p|
+ p.effect = :outline
+
+ p.description do |d|
+ d.color = TEXT_COLOR
+ d.outline_color = OUTLINE_COLOR
+
+ d.font = "fonts/acknowledge2.ttf"
+ d.font_size = 12
+ d.text = "04:11"
+ d.set_text_align(1.0)
+ end
+ end
end
--- /dev/null
+# $Id: playlist-background.rb 6 2005-04-24 09:36:27Z tilman $
+
+c = EDJE.collection("playlist")
+root = c.part("root")
+
+c.part("playlist.background.titlebar.left", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].to = d.rel[1].to = root
+ d.auto_rel = true
+
+ d.image = "images/background-titlebar-left.png"
+ end
+end
+
+c.part("playlist.background.titlebar.right", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].to = d.rel[1].to = root
+
+ d.rel[0].set_rel(1.0, 0.0)
+ d.rel[1].set_rel(1.0, 0.0)
+
+ d.rel[0].set_offset(-12, 0)
+ d.rel[1].set_offset(-1, 17)
+
+ d.image = "images/background-titlebar-right.png"
+ end
+end
+
+c.part("playlist.background.titlebar.middle", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].set_to(c.part("playlist.background.titlebar.left"))
+ d.rel[1].set_to(c.part("playlist.background.titlebar.right"))
+
+ d.rel[0].set_rel(1.0, 0.0)
+ d.rel[1].set_rel(0.0, 1.0)
+
+ d.image = "images/background-titlebar-middle.png"
+ end
+end
+
+c.part("playlist.background.titlebar.text", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].to = d.rel[1].to = root
+ d.rel[0].set_offset(25, 6)
+
+ d.auto_rel = true
+ d.image = "images/background-title-pl.png"
+ end
+end
+
+c.part("playlist.background.titlebar.inset", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].to = d.rel[1].to = root
+ d.rel[0].set_offset(79, 6)
+
+ d.auto_rel = true
+ d.image = "images/background-title-inset.png"
+ end
+end
+
+["left", "right"].each do |id|
+ c.part("playlist.background.top.#{id}", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ ref_part = c.part("playlist.background.titlebar.#{id}")
+ d.rel[0].set_to(ref_part)
+ d.rel[1].set_to(ref_part)
+
+ d.rel[0].set_rel(0.0, 1.0)
+ d.rel[1].set_offset(-1, 11)
+
+ d.image = "images/background-main-top#{id}.png"
+ end
+ end
+end
+
+c.part("playlist.background.top", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].set_to(c.part("playlist.background.top.left"))
+ d.rel[1].set_to(c.part("playlist.background.top.right"))
+
+ d.rel[0].set_rel(1.0, 0.0)
+ d.rel[1].set_rel(0.0, 1.0)
+
+ d.image = "images/background-main-topmiddle.png"
+ end
+end
+
+["left", "right"].each do |id|
+ c.part("playlist.background.#{id}", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ ref_part = c.part("playlist.background.top.#{id}")
+ d.rel[0].to = ref_part
+ d.rel[1].set_to(ref_part, nil)
+
+ d.rel[0].set_rel(0.0, 1.0)
+ d.rel[1].set_offset(-1, -25)
+
+ d.image = "images/background-main-middle#{id}.png"
+ end
+ end
+end
+
+c.part("playlist.background.footer.left", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].to = d.rel[1].to = root
+
+ d.rel[0].set_rel(0.0, 1.0)
+ d.rel[1].set_rel(0.0, 1.0)
+
+ d.rel[0].set_offset(0, -26)
+ d.rel[1].set_offset(11, -1)
+
+ d.image = "images/background-main-footer-left.png"
+ end
+end
+
+c.part("playlist.background.footer.right", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].to = d.rel[1].to = root
+
+ d.rel[0].set_rel(1.0, 1.0)
+ d.rel[0].set_offset(-12, -26)
+
+ d.image = "images/background-main-footer-right.png"
+ end
+end
+
+c.part("playlist.background.footer.middle", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].set_to(c.part("playlist.background.footer.left"))
+ d.rel[1].set_to(c.part("playlist.background.footer.right"))
+
+ d.rel[0].set_rel(1.0, 0.0)
+ d.rel[1].set_rel(0.0, 1.0)
+
+ d.image = "images/background-main-footer-middle.png"
+ end
+end
+
+["left", "right"].each do |id|
+ 2.times do |i|
+ name = i.zero? ? "bottom.#{id}" : "#{id}2"
+ ref_part = i.zero? ? "footer" : "bottom"
+ ref_part = c.part("playlist.background.#{ref_part}.#{id}")
+
+ c.part("playlist.background." + name, :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].set_to(ref_part)
+ d.rel[1].set_to(ref_part)
+
+ d.rel[1].set_rel(1.0, 0.0)
+ d.rel[0].set_offset(0, i.zero? ? -14 : -38)
+
+ img = (i.zero? ? "bottom#{id}" : "middle#{id}-2")
+ d.image = "images/background-main-#{img}.png"
+ end
+ end
+ end
+end
+
+c.part("playlist.background.bottom", :image) do |p|
+ p.repeat_events = true
+
+ p.description do |d|
+ d.rel[0].set_to(c.part("playlist.background.bottom.left"))
+ d.rel[1].set_to(c.part("playlist.background.bottom.right"))
+
+ d.rel[0].set_rel(1.0, 0.0)
+ d.rel[1].set_rel(0.0, 1.0)
+
+ d.image = "images/background-main-bottommiddle.png"
+ end
+end
+
+c.part("playlist.container", :image) do |p|
+ p.description do |d|
+ d.rel[0].set_to(c.part("playlist.background.top.left"))
+ d.rel[1].set_to(c.part("playlist.background.bottom.right"))
+
+ d.rel[0].set_rel(1.0, 1.0)
+ d.rel[1].set_rel(0.0, 0.0)
+
+ d.image = "images/background-main-middle.png"
+ end
+end