aboutsummaryrefslogtreecommitdiffstats
path: root/data/themes/edc/O/temperature.edc
blob: 27dfe1e5d47902885f9123b2c54d7f236b275cb3 (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
/////////////////////////////////////////////////////////////////////////////
/*** MOD: TEMPERATURE ***/

   group {
      name: "e/modules/temperature/main";
      images {
         image: "O/temp_base.png" COMP;
         image: "O/temp_mid.png" COMP;
         image: "O/temp_over.png" COMP;
      }
      min: 16 16;
      max: 128 128;
      script {
         public message(Msg_Type:type, id, ...) {
            if ((type == MSG_FLOAT) && (id == 1)) {
               new Float:val;
               val = getfarg(2);
               set_drag(PART:"temp_top", 0.0, val);
            }
         }
      }
      parts {
         part {
            name: "base";
            clip_to: "fade_clip";
            description {
               state: "default" 0.0;
               aspect: 0.387 0.387;
               aspect_preference: BOTH;
               align: 0.5 0.5;
               max: 48 124;
               rel1 {
                  relative: 0.0 0.0;
               }
               rel2 {
                  relative: 1.0 1.0;
               }
               image {
                  normal: "O/temp_base.png";
               }
            }
         }
         part {
            name: "temp";
            clip_to: "temp_clip";
            description {
               state: "default" 0.0;
               rel1 {
                  to: "base";
               }
               rel2 {
                  to: "base";
               }
               image {
                  normal: "O/temp_mid.png";
               }
            }
         }
         part {
            name: "overlay";
            clip_to: "fade_clip";
            description {
               state: "default" 0.0;
               rel1 {
                  to: "base";
               }
               rel2 {
                  to: "base";
               }
               image {
                  normal: "O/temp_over.png";
               }
            }
         }
         part {
            name: "e.text.reading";
            type: TEXT;
            scale: 1;
            effect: OUTLINE_SOFT_SHADOW;
            clip_to: "fade_clip";
            description {
               state: "default" 0.0;
               align: 1.0 0.0;
               rel1 {
                  relative: 1.0  0.0;
                  to_x: "temp";
               }
               rel2 {
                  relative: 1.0  0.0;
               }
               color: 255 255 255 0;
               color2: 0 0 0 0;
               color3: 0 0 0 0;
               color_class: "module_label";
               text {
                  font: "Sans:style=Bold";
                  size: 8;
                  min: 1 1;
                  align: 0.0 0.0;
                  text_class: "module_small";
               }
            }
            description {
               state: "visible" 0.0;
               inherit: "default" 0.0;
               color: 255 255 255 255;
               color2: 0 0 0 128;
               color3: 0 0 0 32;
            }
         }
         part {
            name: "fade_clip";
            type: RECT;
            mouse_events: 0;
            description {
               state: "default" 0.0;
               color: 255 255 255 255;
            }
            description {
               state: "faded" 0.0;
               color: 255 255 255 128;
            }
         }
         part {
            name: "temp_clip";
            type: RECT;
            clip_to: "fade_clip";
            mouse_events: 0;
            description {
               state: "default" 0.0;
               rel1 {
                  to_x: "base";
                  to_y: "temp_top";
               }
               rel2 {
                  to: "base";
               }
            }
         }
         part {
            name: "temp_top";
            type: RECT;
            dragable {
               x: 0 0 0;
               y: -1 1 0;
               confine: "temp_limit";
            }
            mouse_events: 0;
            description {
               state: "default" 0.0;
               visible: 0;
            }
         }
         part {
            name: "temp_limit";
            type: RECT;
            mouse_events: 0;
            description {
               state: "default" 0.0;
               visible: 0;
               rel1 {
                  relative: 0.0 0.081;
                  to: "base";
               }
               rel2 {
                  relative: 1.0 0.637;
                  to: "base";
               }
            }
         }
         part {
            name: "over";
            type: RECT;
            description {
               state: "default" 0.0;
               color: 0 0 0 0;
            }
         }
      }
      programs {
         program {
            name: "hover1";
            signal: "mouse,in";
            source: "over";
            action: STATE_SET "visible" 0.0;
            transition: LINEAR 0.3;
            target: "e.text.reading";
         }
         program {
            name: "hover2";
            signal: "mouse,out";
            source: "over";
            action: STATE_SET "default" 0.0;
            transition: LINEAR 1.0;
            target: "e.text.reading";
         }
         program {
            name: "known";
            signal: "e,state,known";
            source: "e";
            action: STATE_SET "default" 0.0;
            target: "fade_clip";
         }
         program {
            name: "unknown";
            signal: "e,state,unknown";
            source: "e";
            action: STATE_SET "faded" 0.0;
            target: "fade_clip";
         }
      }
   }