summaryrefslogtreecommitdiff
path: root/icons.edc
blob: 1e2603ac89e87a8f2dacb6668515a277ee0646c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#define BUTTON_ICON(NAME, IMG, OVER)                                          \
   part { name: "_"NAME"_button_icon_bg";                                     \
      mouse_events: 0;                                                        \
      description { state: "default" 0.0;                                     \
         image.image: "icon_"IMG".png" COMP;                                  \
         image.normal: "icon_"IMG".png";                                      \
         aspect: 1.0 1.0;                                                     \
         aspect_preference: BOTH;                                             \
         rel1.to: OVER;                                                       \
         rel2.to: OVER;                                                       \
      }                                                                       \
      description { state: "disabled" 0.0;                                    \
         inherit: "default" 0.0;                                              \
         color: 255 255 255 130;                                              \
      }                                                                       \
   }                                                                          \
   part { name: "_"NAME"_button_icon_disabler";                               \
      mouse_events: 0;                                                        \
      type: RECT;                                                             \
      description { state: "default" 0.0;                                     \
         rel1.to: "_"NAME"_button_icon_bg";                                   \
         rel2.to: "_"NAME"_button_icon_bg";                                   \
         color: 255 255 255 255;                                              \
      }                                                                       \
      description { state: "disabled" 0.0;                                    \
         inherit: "default" 0.0;                                              \
         visible: 0;                                                          \
         color: 0 0 0 0;                                                      \
      }                                                                       \
   }                                                                          \
   part { name: "_"NAME"_button_icon_selected";                               \
      mouse_events: 0;                                                        \
      clip_to: "_"NAME"_button_icon_disabler";                                \
      description { state: "default" 0.0;                                     \
         rel1.to: "_"NAME"_button_icon_bg";                                   \
         rel2.to: "_"NAME"_button_icon_bg";                                   \
         color: 0 0 0 0;                                                      \
         visible: 0;                                                          \
      }                                                                       \
      description { state: "selected" 0.0;                                    \
         inherit: "default" 0.0;                                              \
         color: 255 255 255 255;                                              \
         visible: 1;                                                          \
         image.image: "icon_"IMG"_selected.png" COMP;                         \
         image.normal: "icon_"IMG"_selected.png";                             \
      }                                                                       \
      program { name: "_"NAME"_button_icon_mouse_down";                       \
         signal: "mouse,down,1";                                              \
         source: OVER;                                                        \
         action: STATE_SET "selected" 0.0;                                    \
         target: "_"NAME"_button_icon_selected";                              \
      }                                                                       \
      program { name: "_"NAME"_button_icon_mouse_up";                         \
         signal: "mouse,up,1";                                                \
         source: OVER;                                                        \
         action: STATE_SET "default" 0.0;                                     \
         target: "_"NAME"_button_icon_selected";                              \
      }                                                                       \
   }                                                                          \
   part { name: "_"NAME"_button_icon_hilight";                                \
      mouse_events: 0;                                                        \
      clip_to: "_"NAME"_button_icon_disabler";                                \
      description { state: "default" 0.0;                                     \
         visible: 0;                                                          \
         color: 255 255 255 0;                                                \
         rel1.to: "_"NAME"_button_icon_bg";                                   \
         rel2.to: "_"NAME"_button_icon_bg";                                   \
         image.image: "icon_"IMG"_over.png" COMP;                             \
         image.normal: "icon_"IMG"_over.png";                                 \
      }                                                                       \
      description { state: "over" 0.0;                                        \
         inherit: "default" 0.0;                                              \
         visible: 1;                                                          \
         color: 255 255 255 255;                                              \
      }                                                                       \
      program { name: "_"NAME"_button_icon_mouse_in";                         \
         signal: "mouse,in";                                                  \
         source: OVER;                                                        \
         action: STATE_SET "over" 0.0;                                        \
         transition: LINEAR 0.1;                                              \
         in: 0.05 0.0;                                                        \
         target: "_"NAME"_button_icon_hilight";                               \
      }                                                                       \
      program { name: "_"NAME"_button_icon_mouse_out";                        \
         signal: "mouse,out";                                                 \
         source: OVER;                                                        \
         action: ACTION_STOP;                                                 \
         target: "_"NAME"_button_icon_mouse_in";                              \
         after: "_"NAME"_button_icon_mouse_out2";                             \
      }                                                                       \
      program { name: "_"NAME"_button_icon_mouse_out2";                       \
         action: STATE_SET "default" 0.0;                                     \
         transition: LINEAR 0.2;                                              \
         target: "_"NAME"_button_icon_hilight";                               \
      }                                                                       \
   }                                                                          \