Tweaked min size of the playlist edje.
[multipass-eu.git] / src / player-overlay.rb
1 # $Id: player-overlay.rb 1 2005-04-19 09:41:42Z tilman $
2
3 c = EDJE.collection("euphoria")
4
5 c.part("player.overlay", :rect) do |p|
6         p.repeat_events = true
7
8         p.description do |d|
9                 d.color = "#00000000"
10
11                 d.rel[0].to = d.rel[1].to = c.part("root")
12                 d.rel[1].set_rel(1.0, 0.0)
13                 d.rel[1].set_offset(0, 170)
14         end
15 end
16
17 {"show" => "visible", "hide" => "default"}.each do |name, state|
18         c.program("player.normal.group.drawer.#{name}", :set_state) do |p|
19                 p.state = state
20                 p.mode = :accelerate
21                 p.time = 0.4
22                 p.targets <<
23                         ProgramTarget.new(c.part("player.normal.group.drawer.volume"))
24                 p.targets <<
25                         ProgramTarget.new(c.part("player.normal.group.drawer.left"))
26         end
27 end
28
29 c.program("player.overlay.mouse.out", :exec_script) do |p|
30         p.signal ="mouse,out"
31         p.source = "player.overlay"
32
33         p.script =<<SMALL
34 cancel_timer (get_int (drawer_timer));
35 set_int (drawer_timer, timer (1.0, "drawer_timer_cb", 0));
36 SMALL
37 end
38
39 c.program("player.overlay.mouse.in", :exec_script) do |p|
40         p.signal = "mouse,in"
41         p.source = "player.overlay"
42
43         p.script =<<SMALL
44 new i = get_int (drawer_timer);
45
46 if (i != -1) {
47         cancel_timer (i);
48         set_int (drawer_timer, -1);
49 }
50
51 if (!get_int (toggle_state_drawer))
52         run_program (PROGRAM:"player.normal.group.drawer.show");
53 SMALL
54 end