Removed RCS-style IDs.
[multipass-eu.git] / src / player-drawer-bottom.rb
1 c = EDJE.collection("euphoria")
2 root = c.part("root")
3 bottom = []
4
5 c.part("player.normal.group.drawer.bottom", :rect) do |p|
6         bottom << p
7
8         p.description do |d|
9                 d.visible = false
10                 d.color = "#00000000"
11
12                 d.rel[0].to = d.rel[1].to = root
13                 d.rel[0].set_offset(45, 0)
14
15                 d.rel[1].set_rel(0.0, 0.0)
16                 d.rel[1].set_offset(226, 177)
17         end
18
19         p.description("visible") do |d|
20                 d.visible = true
21                 d.color = "#00000000"
22         end
23 end
24
25 c.part("player.background.drawer.bottom.shadow", :image) do |p|
26         bottom << p
27
28         p.description do |d|
29                 d.rel[0].to = d.rel[1].to = bottom.first
30                 d.image = "background-drawer-bottom-shadow.png"
31         end
32 end
33
34 c.part("player.background.drawer.bottom.top", :image) do |p|
35         bottom << p
36
37         p.description do |d|
38                 d.rel[0].to = d.rel[1].to = bottom.first
39
40                 d.auto_rel = true
41                 d.image = "background-drawer-bottom-top.png"
42         end
43 end
44
45 c.part("player.background.drawer.bottom.bottom", :image) do |p|
46         bottom << p
47
48         p.description do |d|
49                 d.rel[0].to = d.rel[1].to = bottom.first
50                 d.rel[0].set_offset(0, 37)
51
52                 d.auto_rel = true
53                 d.image = "background-drawer-bottom-bottom.png"
54         end
55 end
56
57 c.part("player.background.drawer.bottom.arm", :image) do |p|
58         bottom << p
59
60         p.description do |d|
61                 d.rel[0].to = d.rel[1].to = bottom.first
62                 d.rel[0].set_offset(64, 0)
63
64                 d.auto_rel = true
65                 d.image = "background-drawer-bottom-arm.png"
66         end
67 end
68
69 c.part("player.background.drawer.bottom.title", :image) do |p|
70         bottom << p
71
72         p.description do |d|
73                 d.rel[0].to = d.rel[1].to = bottom.first
74                 d.rel[0].set_offset(9, 26)
75
76                 d.auto_rel = true
77                 d.image = "background-drawer-bottom-title.png"
78         end
79 end
80
81 h = {"eq" => 9,
82      "options" => 39,
83      "colorthemes" => 94}
84 h.each do |name, (x, im)|
85         bottom << Button.new(c, "player.button." << name, bottom.first,
86                              "button-#{im || name}", x, 151).part
87 end
88
89 c.part("player.background.drawer.bottom.clip", :rect) do |p|
90         p.description do |d|
91                 d.rel[0].to = d.rel[1].to = root
92                 d.rel[0].set_offset(45, 155)
93                 d.rel[1].set_rel(0.0, 0.0)
94                 d.rel[1].set_offset(226, 332)
95         end
96
97         bottom.each { |i| i.clip = p }
98
99         c.part("player.normal.group.drawer.bottom").description("visible") do |d|
100                 d.rel[0].to = d.rel[1].to = p
101         end
102 end
103
104 {"show" => "visible", "hide" => "default"}.each do |prog, state|
105         c.program("player.normal.group.drawer.bottom.#{prog}",
106                   :set_state) do |p|
107                 p.state = state
108                 p.time = 0.5
109                 p.targets <<
110                         ProgramTarget.new(c.part("player.normal.group.drawer.bottom"))
111         end
112 end