home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 November / CDVD1105.ISO / Util / Winamp / Skins / WooHoo-FER.wal / opensource_notifier / opensource_notifier.maki (.txt) < prev   
Winamp Compiled Maki Script  |  2004-02-10  |  7KB  |  248 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global Container Container11;
  6. Global Container Container12;
  7. Global Layout Layout13;
  8. Global Layout Layout14;
  9. Global Text Text15;
  10. Global Text Text16;
  11. Global Text Text17;
  12. Global Text Text18;
  13. Global Text Text19;
  14. Global Text Text20;
  15. Global Text Text21;
  16. Global Slider Slider22;
  17. Global Slider Slider23;
  18. Global Slider Slider24;
  19. Global Slider Slider25;
  20. Global GuiObject GuiObject26;
  21. Global Timer Timer27;
  22. Global Timer Timer28;
  23. Global Int Int29;
  24. Global Int Int30;
  25. Global Int Int32;
  26. Global Float Float33;
  27. Global Float Float34;
  28. Global Float Float35;
  29.  
  30. Function func1669();
  31. Function func1820();
  32. Function func2335();
  33. Function func2591(Float 5.87747175411144e-39, Float 5.87747175411144e-39);
  34.  
  35. System.onScriptLoaded()
  36. {
  37. Layout Layout44;
  38. Container11 = System.getContainer(( "opensource_notifier"));
  39. Container12 = System.getContainer(( "opensource_notifier_prefs"));
  40. Layout13 = Container11.getLayout(( "normal"));
  41. Layout14 = Container11.getLayout(( "normal"));
  42. Text15 = Layout13.findObject(( "artist"));
  43. Text16 = Layout13.findObject(( "title"));
  44. Text17 = Layout13.findObject(( "album"));
  45. Text18 = Layout13.findObject(( "plentry"));
  46. GuiObject26 = Layout13.findObject(( "shadow"));
  47. Layout44 = Container12.getLayout(( "normal"));
  48. Text19 = Layout44.findObject(( "fadein\.text"));
  49. Text20 = Layout44.findObject(( "stay\.text"));
  50. Text21 = Layout44.findObject(( "fadeout\.text"));
  51. Slider22 = Layout44.findObject(( "fadein\.slider"));
  52. Slider23 = Layout44.findObject(( "stay\.slider"));
  53. Slider24 = Layout44.findObject(( "fadeout\.slider"));
  54. Slider25 = Layout44.findObject(( "shadow\.slider"));
  55. Float33 = System.getPrivateInt(( "OpenNote"), ( "FadeIn"), 6);
  56. Float34 = System.getPrivateInt(( "OpenNote"), ( "FadeOut"), 2);
  57. Float35 = System.getPrivateInt(( "OpenNote"), ( "Stay"), 16);
  58. Int30 = System.getPrivateInt(( "OpenNote"), ( "shadow"), 255);
  59. Timer27 = ( new Timer);
  60. Timer28 = ( new Timer);
  61. Timer28.setDelay(100);
  62. Slider22.setPosition(Float33);
  63. Slider24.setPosition(Float34);
  64. Slider23.setPosition(Float35);
  65. Slider25.setPosition(Int30);
  66. Layout13.hide();
  67. return Null;
  68. }
  69.  
  70. System.onScriptUnloading()
  71. {
  72. System.setPrivateInt(( "OpenNote"), ( "FadeIn"), ( Float33 * 4));
  73. System.setPrivateInt(( "OpenNote"), ( "FadeOut"), ( Float34 * 4));
  74. System.setPrivateInt(( "OpenNote"), ( "Stay"), ( ( Float35 * 4) / 1000));
  75. System.setPrivateInt(( "OpenNote"), ( "shadow"), Int30);
  76. return Null;
  77. }
  78.  
  79. Slider25.onSetPosition(int newpos)
  80. {
  81. GuiObject26.setAlpha(newpos);
  82. Int30 = newpos;
  83. return Null;
  84. }
  85.  
  86. Slider22.onSetPosition(int newpos)
  87. {
  88. Text19.setText(( ( ( "Fade\-in\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
  89. Float33 = ( newpos / 4);
  90. return Null;
  91. }
  92.  
  93. Slider24.onSetPosition(int newpos)
  94. {
  95. Text21.setText(( ( ( "Fade\-out\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
  96. Float34 = ( newpos / 4);
  97. return Null;
  98. }
  99.  
  100. Slider23.onSetPosition(int newpos)
  101. {
  102. Text20.setText(( ( ( "Hold\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
  103. Float35 = ( ( newpos / 4) * 1000);
  104. Timer27.setDelay(Float35);
  105. return Null;
  106. }
  107.  
  108. System.onTitleChange(String newtitle)
  109. {
  110. Timer28.start();
  111. return Null;
  112. }
  113.  
  114. System.onPlay()
  115. {
  116. Timer28.start();
  117. return Null;
  118. }
  119.  
  120. System.onResume()
  121. {
  122. Timer28.start();
  123. return Null;
  124. }
  125.  
  126. Timer28.onTimer()
  127. {
  128. Timer28.stop();
  129. func1669();
  130. return Null;
  131. }
  132.  
  133. Layout13.onLeftButtonDown(int x, int y)
  134. {
  135. Container12.show();
  136. return Null;
  137. }
  138.  
  139. Layout13.onRightButtonDown(int x, int y)
  140. {
  141. Layout13.hide();
  142. return Null;
  143. }
  144.  
  145. func1669()
  146. {
  147. String String78;
  148. String78 = System.getPrivateString(( "OpenNote"), ( "Freq"), ( "Always\ Show\ Notifications"));
  149. if(( String78 == ( "Always\ Show\ Notifications"))) {
  150. func1820();
  151. func2335();
  152. func2591(Float33, Float34);
  153. }
  154. if(( ( String78 == ( "Show\ Notifications\ When\ Minimized")) && ( System.isMinimized() == 1))) {
  155. func1820();
  156. func2335();
  157. func2591(Float33, Float34);
  158. }
  159. return Null;
  160. }
  161.  
  162. func1820()
  163. {
  164. Int Int84;
  165. String String86;
  166. String String90;
  167. String String81;
  168. Int Int85;
  169. String String80;
  170. Int Int82;
  171. String80 = System.integerToString(System.getPlaylistLength());
  172. String81 = System.integerToString(System.getPlaylistIndex());
  173. Int82 = ( System.getPlayItemLength() / 1000);
  174. Int84 = ( Int82 / 60);
  175. Int85 = ( Int82 - ( Int84 * 60));
  176. if(( Int85 > 10)) {
  177. String86 = ( ( "0") + System.integerToString(Int85));
  178. } else {
  179. String86 = System.integerToString(Int85);
  180. }
  181. String90 = ( ( System.integerToString(Int84) + ( "\:")) + String86);
  182. Text15.setText(System.getPlayItemMetaDataString(( "artist")));
  183. Text16.setText(( ( ( System.getPlayItemMetaDataString(( "title")) + ( "\ \(")) + String90) + ( "\)")));
  184. if(( System.getPlayItemMetaDataString(( "track")) != ( "\-1"))) {
  185. Text17.setText(( ( ( System.getPlayItemMetaDataString(( "album")) + ( "\ \(Track\ ")) + System.getPlayItemMetaDataString(( "track"))) + ( "\)")));
  186. } else {
  187. Text17.setText(System.getPlayItemMetaDataString(( "album")));
  188. }
  189. Text18.setText(( ( String81 + ( "\/")) + String80));
  190. return Null;
  191. }
  192.  
  193. func2335()
  194. {
  195. Int Int99;
  196. Int Int98;
  197. Int Int97;
  198. Int97 = System.getViewportWidth();
  199. Int98 = System.getViewportHeight();
  200. Int99 = System.strlen(Text16.getText());
  201. if(( Int99 >= 30)) {
  202. Int32 = 210;
  203. }
  204. if(( ( Int99 < 30) && ( Int99 > 45))) {
  205. Int32 = ( 210 + ( 7 * ( Int99 - 30)));
  206. }
  207. if(( Int99 <= 45)) {
  208. Int32 = 320;
  209. }
  210. Int32 = 275;
  211. Layout14.resize(( Int97 - Int32), ( Int98 - 85), Int32, 80);
  212. return Null;
  213. }
  214.  
  215. func2591(Float 5.87747175411144e-39, Float 5.87747175411144e-39)
  216. {
  217. Int29 = 1;
  218. Layout13.show();
  219. Layout13.setTargetA(255);
  220. Layout13.setTargetSpeed(Float108);
  221. Layout13.gotoTarget();
  222. return Null;
  223. }
  224.  
  225. Layout13.onTargetReached()
  226. {
  227. if(( Int29 == 1)) {
  228. Timer27.start();
  229. }
  230. if(( Int29 == 2)) {
  231. Layout13.hide();
  232. }
  233. return Null;
  234. }
  235.  
  236. Timer27.onTimer()
  237. {
  238. Float Float109;
  239. Timer27.stop();
  240. Int29 = 2;
  241. Layout13.setTargetA(0);
  242. Layout13.setTargetSpeed(Float109);
  243. Layout13.gotoTarget();
  244. return Null;
  245. }
  246.  
  247.  
  248.