Added playlist buttons.
[multipass-eu.git] / src / playlist-buttons.rb
1 # $Id: playlist-buttons.rb 7 2005-04-24 10:46:14Z tilman $
2
3 c = EDJE.collection("playlist")
4 root = c.part("root")
5 right = c.part("playlist.background.titlebar.right")
6
7 buttons = []
8
9 h = {"playlist.button.close" => ["close", [right, -10, 5]],
10      "playlist.button.switch" => [nil, [right, -30, 5]],
11      "playlist.button.system" => [nil, [root, 5, 5]]}
12 h.each do |name, (sig, (rel, x, y))|
13         args = [c, name, rel, image_from_name(name), x, y]
14         args << sig unless sig.nil?
15
16         buttons << (sig.nil? ? Button : SignalButton).new(*args).part
17 end