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
215
216
217
|
/*---------------------------------------------------
-----------------------------------------------------
Filename: shadesize.m
Version: 2.1
Type: maki
Date: 23. Jul. 2007 - 17:24
Author: Martin Poehlmann aka Deimos
E-Mail: martin@skinconsortium.com
Internet: www.skinconsortium.com
www.martin.deimos.de.vu
-----------------------------------------------------
---------------------------------------------------*/
#include <lib/std.mi>
#include attribs/init_appearance.m
Function updateObjectPosition(int w);
Global Group scriptGroup;
//Global Group g_cbuttons, g_sysbuttons, g_display, g_volume, g_seek, g_vis, g_links;
Global Group g_cbuttons, g_sysbuttons, g_display, g_volume, g_seek, g_vis;
//Global Int minumim_w, x_cbuttons, w_cbuttons, w_sysbuttons, w_volume, w_display, w_seek, w_vis, x_seek, w_links, w_links_, x_links, x_links_;
Global Int minumim_w, x_cbuttons, w_cbuttons, w_sysbuttons, w_volume, w_display, w_seek, w_vis, x_seek;
System.onScriptLoaded ()
{
initAttribs_Appearance();
scriptGroup = getScriptGroup();
g_cbuttons = scriptGroup.findObject("shade.cbuttons");
x_cbuttons = stringToInteger(g_cbuttons.getXmlParam("x"));
w_cbuttons = stringToInteger(g_cbuttons.getXmlParam("w"));
g_seek = scriptGroup.findObject("shade.seek");
w_seek = stringToInteger(g_seek.getXmlParam("w"));
x_seek = stringToInteger(g_seek.getXmlParam("x"));
g_vis = scriptGroup.findObject("shade.vis");
w_vis = stringToInteger(g_vis.getXmlParam("w"));
/*
g_links = scriptGroup.findObject("shade.links");
w_links_ = stringToInteger(g_links.getXmlParam("w"));
x_links_ = stringToInteger(g_links.getXmlParam("x"));
*/
w_sysbuttons = stringToInteger(getParam());
g_display = scriptGroup.findObject("shade.display");
w_display = stringToInteger(g_display.getXmlParam("w"));
g_volume = scriptGroup.findObject("shade.volume");
w_volume = stringToInteger(g_volume.getXmlParam("w"));
}
scriptGroup.onResize (int x, int y, int w, int h)
{
updateObjectPosition(w);
}
scriptGroup.onSetVisible (Boolean onoff)
{
if (onoff)
{
updateObjectPosition(scriptGroup.getWidth());
}
}
/*
artist_info_buttons_attrib.onDataChanged ()
{
updateObjectPosition(scriptGroup.getWidth());
}
*/
updateObjectPosition (int w)
{
/* if (artist_info_buttons_attrib.getData() == "1")
{
w_links = w_links_;
x_links = x_links_;
}
else
{
w_links = x_links = 0;
}
*/
// if (w >= x_cbuttons + w_cbuttons + 2 * w_display + w_volume + w_sysbuttons + 3.5 * w_seek + w_vis + w_links)
if (w >= x_cbuttons + w_cbuttons + 2 * w_display + w_volume + w_sysbuttons + 3.5 * w_seek + w_vis)
{
// if(g_links != null) g_links.setXmlParam("x", integerToString(x_seek - 2*w_seek - w_links));
g_seek.setXmlParam("x", integerToString(x_seek - 2*w_seek));
g_seek.setXmlParam("w", integerToString(3 * w_seek));
g_cbuttons.setXmlParam("x", integerToString(2 + x_cbuttons + w_vis));
g_volume.setXmlParam("x", integerToString(2 + x_cbuttons + w_vis + w_cbuttons));
g_display.setXmlParam("x", integerToString(2 + x_cbuttons + w_cbuttons + w_volume + w_vis));
// g_display.setXmlParam("w", integerToString(0 - 1 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - 3 * w_seek - w_vis - w_links));
g_display.setXmlParam("w", integerToString(0 - 1 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - 3 * w_seek - w_vis));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.show();
g_seek.show();
g_vis.show();
/* if(w_links != 0) g_links.show();
else g_links.hide();
*/
}
// else if (w >= x_cbuttons + w_cbuttons + 2 * w_display + w_volume + w_sysbuttons + 2 * w_seek + w_vis + w_links)
else if (w >= x_cbuttons + w_cbuttons + 2 * w_display + w_volume + w_sysbuttons + 2 * w_seek + w_vis)
{
// if(g_links != null) g_links.setXmlParam("x", integerToString(x_seek - w_seek - w_links));
g_seek.setXmlParam("x", integerToString(x_seek - w_seek));
g_seek.setXmlParam("w", integerToString(2 * w_seek));
g_cbuttons.setXmlParam("x", integerToString(2 + x_cbuttons + w_vis));
g_volume.setXmlParam("x", integerToString(2 + x_cbuttons + w_vis + w_cbuttons));
g_display.setXmlParam("x", integerToString(2 + x_cbuttons + w_cbuttons + w_volume + w_vis));
// g_display.setXmlParam("w", integerToString(0 - 1 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - 2 * w_seek - w_vis - w_links));
g_display.setXmlParam("w", integerToString(0 - 1 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - 2 * w_seek - w_vis));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.show();
g_seek.show();
g_vis.show();
/* if(w_links != 0) g_links.show();
else g_links.hide();
*/
}
// else if (w >= x_cbuttons + w_cbuttons + w_display + w_volume + w_sysbuttons + w_seek + w_vis + w_links)
else if (w >= x_cbuttons + w_cbuttons + w_display + w_volume + w_sysbuttons + w_seek + w_vis)
{
// if(g_links != null) g_links.setXmlParam("x", integerToString(x_seek - w_links));
g_seek.setXmlParam("x", integerToString(x_seek));
g_seek.setXmlParam("w", integerToString(w_seek));
g_cbuttons.setXmlParam("x", integerToString(2 + x_cbuttons + w_vis));
g_volume.setXmlParam("x", integerToString(2 + x_cbuttons + w_vis + w_cbuttons));
g_display.setXmlParam("x", integerToString(2 + x_cbuttons + w_cbuttons + w_volume + w_vis));
// g_display.setXmlParam("w", integerToString(0 - 1 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - w_seek - w_vis - w_links));
g_display.setXmlParam("w", integerToString(0 - 1 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - w_seek - w_vis));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.show();
g_seek.show();
g_vis.show();
/* if(w_links != 0) g_links.show();
else g_links.hide();
*/
}
// else if (w >= x_cbuttons + w_cbuttons + w_display + w_volume + w_sysbuttons + w_seek + w_links)
else if (w >= x_cbuttons + w_cbuttons + w_display + w_volume + w_sysbuttons + w_seek)
{
// if(g_links != null) g_links.setXmlParam("x", integerToString(x_seek - w_links));
g_seek.setXmlParam("x", integerToString(x_seek));
g_seek.setXmlParam("w", integerToString(w_seek));
g_volume.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons));
g_cbuttons.setXmlParam("x", integerToString(x_cbuttons));
g_display.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons + w_volume));
// g_display.setXmlParam("w", integerToString(0 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - w_seek - w_links));
g_display.setXmlParam("w", integerToString(0 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - w_seek));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.show();
g_seek.show();
g_vis.hide();
/* if(w_links != 0) g_links.show();
else g_links.hide();
*/
}
else if (w >= x_cbuttons + w_cbuttons + w_display + w_volume + w_sysbuttons + w_seek)
{
g_seek.setXmlParam("x", integerToString(x_seek));
g_seek.setXmlParam("w", integerToString(w_seek));
g_volume.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons));
g_cbuttons.setXmlParam("x", integerToString(x_cbuttons));
g_display.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons + w_volume));
g_display.setXmlParam("w", integerToString(0 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume - w_seek));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.show();
g_seek.show();
g_vis.hide();
// g_links.hide();
}
else if (w >= x_cbuttons + w_cbuttons + w_display + w_volume + w_sysbuttons)
{
g_cbuttons.setXmlParam("x", integerToString(x_cbuttons));
g_volume.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons));
g_display.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons + w_volume));
g_display.setXmlParam("w", integerToString(0 - x_cbuttons - w_cbuttons - w_sysbuttons - w_volume));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.show();
g_seek.hide();
g_vis.hide();
// g_links.hide();
}
else if (w >= x_cbuttons + w_cbuttons + w_display + w_sysbuttons)
{
g_cbuttons.setXmlParam("x", integerToString(x_cbuttons));
g_volume.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons));
g_display.setXmlParam("x", integerToString(x_cbuttons + w_cbuttons));
g_display.setXmlParam("w", integerToString(0 - x_cbuttons - w_cbuttons - w_sysbuttons));
g_display.setXmlParam("relatw", "1");
g_display.show();
g_volume.hide();
g_seek.hide();
g_vis.hide();
// g_links.hide();
}
else
{
g_cbuttons.setXmlParam("x", integerToString(x_cbuttons));
g_volume.hide();
g_display.hide();
g_seek.hide();
g_vis.hide();
// g_links.hide();
}
}
|