home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 July & August / Gamestar_64_2004-07-08_dvd.iso / Programy / winamp501_full.exe / $_14327_ / shadecontrol.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2003-11-16  |  9KB  |  303 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global ConfigAttribute ConfigAttribute3;
  6. Global ConfigAttribute ConfigAttribute4;
  7. Global ConfigAttribute ConfigAttribute5;
  8. Global ConfigAttribute ConfigAttribute6;
  9. Global ConfigAttribute ConfigAttribute7;
  10. Global ConfigAttribute ConfigAttribute8;
  11. Global ConfigAttribute ConfigAttribute9;
  12. Global ConfigAttribute ConfigAttribute10;
  13. Global ConfigAttribute ConfigAttribute11;
  14. Global ConfigAttribute ConfigAttribute12;
  15. Global ConfigAttribute ConfigAttribute13;
  16. Global ConfigAttribute ConfigAttribute14;
  17. Global ConfigAttribute ConfigAttribute15;
  18. Global ConfigAttribute ConfigAttribute16;
  19. Global ConfigAttribute ConfigAttribute17;
  20. Global ConfigAttribute ConfigAttribute18;
  21. Global ConfigAttribute ConfigAttribute19;
  22. Global ConfigAttribute ConfigAttribute20;
  23. Global ConfigAttribute ConfigAttribute21;
  24. Global ConfigAttribute ConfigAttribute22;
  25. Global ConfigAttribute ConfigAttribute23;
  26. Global ConfigAttribute ConfigAttribute24;
  27. Global ConfigAttribute ConfigAttribute25;
  28. Global ConfigAttribute ConfigAttribute26;
  29. Global ConfigAttribute ConfigAttribute27;
  30. Global ConfigAttribute ConfigAttribute28;
  31. Global ConfigAttribute ConfigAttribute29;
  32. Global Group Group103;
  33. Global Group Group104;
  34. Global Group Group105;
  35. Global Group Group106;
  36. Global Group Group107;
  37. Global Group Group108;
  38. Global Group Group109;
  39. Global Group Group110;
  40. Global Group Group111;
  41. Global Button Button112;
  42. Global Button Button113;
  43. Global Button Button114;
  44. Global Layout Layout115;
  45. Global Layout Layout116;
  46. Global Layer Layer117;
  47. Global Text Text118;
  48. Global Button Button119;
  49.  
  50. Function func0();
  51. Function func2021(Int 0);
  52. Function func3352();
  53.  
  54. func0()
  55. {
  56. ConfigAttribute ConfigAttribute61;
  57. ConfigAttribute ConfigAttribute66;
  58. ConfigItem ConfigItem47;
  59. ConfigAttribute ConfigAttribute65;
  60. ConfigAttribute ConfigAttribute71;
  61. ConfigItem ConfigItem32;
  62. ConfigAttribute ConfigAttribute60;
  63. ConfigItem ConfigItem41;
  64. ConfigAttribute ConfigAttribute59;
  65. ConfigItem ConfigItem57;
  66. ConfigItem ConfigItem44;
  67. ConfigItem ConfigItem50;
  68. ConfigItem ConfigItem35;
  69. ConfigItem ConfigItem55;
  70. ConfigAttribute ConfigAttribute62;
  71. ConfigAttribute ConfigAttribute64;
  72. ConfigItem ConfigItem38;
  73. ConfigItem ConfigItem53;
  74. ConfigItem32 = Config.newItem(( "Winamp\ Modern"), ( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  75. ConfigItem35 = Config.newItem(( "Drawers"), ( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  76. ConfigItem38 = Config.newItem(( "Menus"), ( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  77. ConfigItem41 = Config.newItem(( "Main\ Windowshade\ Mode"), ( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  78. ConfigItem44 = Config.newItem(( "Vis\ Buttons"), ( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  79. ConfigItem47 = Config.newItem(( "Notifications"), ( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  80. ConfigItem50 = Config.newItem(( "Songticker"), ( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  81. ConfigItem53 = Config.newItem(( "Hidden"), ( "\{E9C2D926\-53CA\-400f\-9A4D\-85E31755A4CF\}"));
  82. ConfigItem55 = Config.getItem(( "\{1828D28F\-78DD\-4647\-8532\-EBA504B8FC04\}"));
  83. ConfigItem57 = Config.getItem(( "\{6559CA61\-7EB2\-4415\-A8A9\-A2AEEF762B7F\}"));
  84. ConfigAttribute59 = ConfigItem55.newAttribute(( "Winamp\ Modern"), ( ""));
  85. ConfigAttribute59.setData(( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  86. ConfigAttribute60 = ConfigItem32.newAttribute(( "Drawers"), ( ""));
  87. ConfigAttribute60.setData(( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  88. ConfigAttribute61 = ConfigItem32.newAttribute(( "Menus"), ( ""));
  89. ConfigAttribute61.setData(( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  90. ConfigAttribute62 = ConfigItem32.newAttribute(( "Main\ Windowshade\ Mode"), ( ""));
  91. ConfigAttribute62.setData(( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  92. ConfigAttribute64 = ConfigItem32.newAttribute(( "Vis\ Shortcut\ Button"), ( ""));
  93. ConfigAttribute64.setData(( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  94. ConfigAttribute65 = ConfigItem32.newAttribute(( "Notifications"), ( ""));
  95. ConfigAttribute65.setData(( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  96. ConfigAttribute66 = ConfigItem32.newAttribute(( "Songticker"), ( ""));
  97. ConfigAttribute66.setData(( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  98. ConfigAttribute3 = ConfigItem35.newAttribute(( "Animate\ Video\/Vis\ Drawer\ \(disabled\ if\ opacity\ \<\ 100\%\)"), ( "0"));
  99. ConfigAttribute4 = ConfigItem35.newAttribute(( "Animate\ Config\ Drawer"), ( "0"));
  100. ConfigAttribute71 = ConfigItem35.newAttribute(( "sep1"), ( ""));
  101. ConfigAttribute71.setData(( "\-"));
  102. ConfigAttribute7 = ConfigItem35.newAttribute(( "Open\ Video\/Vis\ from\ the\ top"), ( "0"));
  103. ConfigAttribute8 = ConfigItem35.newAttribute(( "Open\ Video\/Vis\ from\ the\ bottom"), ( "1"));
  104. ConfigAttribute9 = ConfigItem35.newAttribute(( "Bypass\ setting\ to\ keep\ in\ screen"), ( "1"));
  105. if(( ConfigAttribute7.getData() == ( "1"))) {
  106. ConfigAttribute7.onDataChanged();
  107. } else {
  108. ConfigAttribute8.onDataChanged();
  109. }
  110. ConfigAttribute11 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Main\ Window"), ( "1"));
  111. ConfigAttribute12 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Playlist\ Editor"), ( "1"));
  112. ConfigAttribute13 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Media\ Library"), ( "1"));
  113. ConfigAttribute71 = ConfigItem32.newAttribute(( "sep1"), ( ""));
  114. ConfigAttribute71.setData(( "\-"));
  115. ConfigAttribute5 = ConfigItem32.newAttribute(( "Detach\ Vis\ Window"), ( "0"));
  116. ConfigAttribute6 = ConfigItem32.newAttribute(( "Detach\ Video\ Window"), ( "0"));
  117. ConfigAttribute10 = ConfigItem57.newAttribute(( "Equalizer\ Alt\+G"), ( "0"));
  118. ConfigAttribute71 = ConfigItem32.newAttribute(( "sep2"), ( ""));
  119. ConfigAttribute71.setData(( "\-"));
  120. ConfigAttribute17 = ConfigItem32.newAttribute(( "Enable\ Beat\ Visualization"), ( "1"));
  121. ConfigAttribute14 = ConfigItem41.newAttribute(( "Link\ Position\ and\ Width"), ( "1"));
  122. ConfigAttribute15 = ConfigItem41.newAttribute(( "Link\ Position\,\ Unlink\ Width"), ( "0"));
  123. ConfigAttribute16 = ConfigItem41.newAttribute(( "Unlink\ Position\ and\ Width"), ( "0"));
  124. ConfigAttribute19 = ConfigItem44.newAttribute(( "Open\ Context\ Menu"), ( "1"));
  125. ConfigAttribute18 = ConfigItem44.newAttribute(( "Open\ Configuration"), ( "0"));
  126. ConfigAttribute22 = ConfigItem47.newAttribute(( "Show\ always"), ( "0"));
  127. ConfigAttribute21 = ConfigItem47.newAttribute(( "Show\ with\ windowshade\ and\ when\ minimized"), ( "0"));
  128. ConfigAttribute20 = ConfigItem47.newAttribute(( "Show\ only\ when\ minimized"), ( "0"));
  129. ConfigAttribute23 = ConfigItem47.newAttribute(( "Never\ show"), ( "1"));
  130. ConfigAttribute71 = ConfigItem47.newAttribute(( "sep1"), ( ""));
  131. ConfigAttribute71.setData(( "\-"));
  132. ConfigAttribute27 = ConfigItem47.newAttribute(( "Disable\ in\ fullscreen"), ( "1"));
  133. ConfigAttribute24 = ConfigItem53.newAttribute(( "Notifications\ fade\ in\ time"), ( "1000"));
  134. ConfigAttribute25 = ConfigItem53.newAttribute(( "Notifications\ fade\ out\ time"), ( "5000"));
  135. ConfigAttribute26 = ConfigItem53.newAttribute(( "Notifications\ display\ time"), ( "2000"));
  136. ConfigAttribute28 = ConfigItem50.newAttribute(( "Enable\ Songticker\ scrolling"), ( "1"));
  137. ConfigAttribute29 = ConfigItem50.newAttribute(( "Disable\ Songticker\ scrolling"), ( "0"));
  138. return Null;
  139. }
  140.  
  141. System.onScriptLoaded()
  142. {
  143. func0();
  144. Group103 = System.getScriptGroup();
  145. Layout115 = Group103.getParentLayout();
  146. Layout116 = Group103.getParentLayout().getContainer().getLayout(( "normal"));
  147. Group104 = Group103.findObject(( "shadeX1"));
  148. Group105 = Group103.findObject(( "shadeX2"));
  149. Group106 = Group103.findObject(( "shadeX3"));
  150. Button114 = Group103.findObject(( "shadeeq"));
  151. Group107 = Group103.findObject(( "shadedisplay"));
  152. Group108 = Group103.findObject(( "shadedisplay2"));
  153. Group109 = Group103.findObject(( "shadetimer"));
  154. Group110 = Group103.findObject(( "shadeticker"));
  155. Group111 = Group103.findObject(( "shadevis"));
  156. Button112 = Group103.findObject(( "shade\.expand"));
  157. Button113 = Group103.findObject(( "shade\.reduce"));
  158. Button119 = Group103.findObject(( "shadect"));
  159. Text118 = Group103.findObject(( "SongtickerShade"));
  160. Layer117 = Group103.findObject(( "volumebarShade"));
  161. Layer117.setXmlParam(( "w"), System.integerToString(( ( ( System.getVolume() / 255) * 40) + 5)));
  162. func3352();
  163. return Null;
  164. }
  165.  
  166. Group103.onResize(int x, int y, int w, int h)
  167. {
  168. func2021(w);
  169. return Null;
  170. }
  171.  
  172. Button114.onLeftClick()
  173. {
  174. ConfigAttribute10.setData(( "1"));
  175. return Null;
  176. }
  177.  
  178. func2021(Int 0)
  179. {
  180. Int Int150;
  181. Int Int147;
  182. Int147 = System.getPrivateInt(( "winamp5"), ( "ShowShadeButtons"), 0);
  183. if(Int147) {
  184. Button112.show();
  185. Button113.hide();
  186. } else {
  187. Button112.hide();
  188. Button113.show();
  189. }
  190. Group104.hide();
  191. Group105.hide();
  192. Group106.hide();
  193. Group107.hide();
  194. Group108.hide();
  195. Group109.hide();
  196. Group110.hide();
  197. Group111.hide();
  198. if(( Int143 < 400)) {
  199. Int150 = ( Int143 - 356);
  200. Group107.setXmlParam(( "w"), System.integerToString(Int150));
  201. Group107.show();
  202. Group109.show();
  203. if(( Int143 < 420)) {
  204. Group110.show();
  205. Group110.setXmlParam(( "w"), System.integerToString(Int150));
  206. if(( Int143 < 560)) {
  207. Group107.hide();
  208. Group108.setXmlParam(( "w"), System.integerToString(( Int150 - 45)));
  209. Group108.show();
  210. Group110.setXmlParam(( "w"), System.integerToString(( Int150 - 56)));
  211. if(Int147) {
  212. Group104.setXmlParam(( "x"), ( "\-100"));
  213. Group104.show();
  214. if(( Int143 < 583)) {
  215. Group108.setXmlParam(( "w"), System.integerToString(( Int150 - 68)));
  216. Group110.setXmlParam(( "w"), System.integerToString(( Int150 - 79)));
  217. Group104.setXmlParam(( "x"), ( "\-123"));
  218. Group105.setXmlParam(( "x"), ( "\-80"));
  219. Group105.show();
  220. if(( Int143 < 642)) {
  221. Group108.setXmlParam(( "w"), System.integerToString(( Int150 - 127)));
  222. Group110.setXmlParam(( "w"), System.integerToString(( Int150 - 138)));
  223. Group104.setXmlParam(( "x"), ( "\-182"));
  224. Group105.setXmlParam(( "x"), ( "\-139"));
  225. Group106.setXmlParam(( "x"), ( "\-116"));
  226. Group106.show();
  227. if(( Int143 < 660)) {
  228. Group111.setXmlParam(( "x"), System.integerToString(( - 257)));
  229. Group111.show();
  230. Group110.setXmlParam(( "w"), System.integerToString(( Int150 - 194)));
  231. }
  232. }
  233. }
  234. } else {
  235. Group108.setXmlParam(( "w"), System.integerToString(Int150));
  236. Group111.setXmlParam(( "x"), System.integerToString(( - 130)));
  237. Group111.show();
  238. Group110.setXmlParam(( "w"), System.integerToString(( Int150 - 66)));
  239. }
  240. }
  241. }
  242. }
  243. return Null;
  244. }
  245.  
  246. System.onKeyDown(String key)
  247. {
  248. if(( ( ( System.Strleft(key, 4) == ( "ctrl")) && ( System.strsearch(key, ( "\+w")) != ( - 1))) && ( Layout115.isActive() || Layout116.isActive()))) {
  249. if(Layout115.isVisible()) {
  250. Layout115.getContainer().switchToLayout(( "normal"));
  251. } else {
  252. Layout115.getContainer().switchToLayout(( "shade"));
  253. }
  254. complete;
  255. }
  256. return Null;
  257. }
  258.  
  259. Button112.onLeftClick()
  260. {
  261. System.setPrivateInt(( "winamp5"), ( "ShowShadeButtons"), 0);
  262. func2021(Layout115.getGuiW());
  263. return Null;
  264. }
  265.  
  266. Button113.onLeftClick()
  267. {
  268. System.setPrivateInt(( "winamp5"), ( "ShowShadeButtons"), 1);
  269. func2021(Layout115.getGuiW());
  270. return Null;
  271. }
  272.  
  273. System.onVolumeChanged(int newvol)
  274. {
  275. Layer117.setXmlParam(( "w"), System.integerToString(( ( ( newvol / 255) * 40) + 5)));
  276. return Null;
  277. }
  278.  
  279. ConfigAttribute28.onDataChanged()
  280. {
  281. func3352();
  282. return Null;
  283. }
  284.  
  285. func3352()
  286. {
  287. if(( ConfigAttribute28.getData() == ( "1"))) {
  288. Text118.setXmlParam(( "ticker"), ( "1"));
  289. } else {
  290. Text118.setXmlParam(( "ticker"), ( "0"));
  291. }
  292. return Null;
  293. }
  294.  
  295. Button119.onRightButtonDown(int x, int y)
  296. {
  297. System.triggerAction(Button119, ( "ThemesSlotsMenu"), ( ""));
  298. complete;
  299. return Null;
  300. }
  301.  
  302.  
  303.