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

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global GuiObject GuiObject2;
  6. Global GuiObject GuiObject3;
  7. Global GuiObject GuiObject4;
  8. Global Text Text5;
  9. Global Layer Layer6;
  10. Global Group Group7;
  11. Global Int Int8;
  12. Global Int Int9;
  13.  
  14. Function func556();
  15.  
  16. System.onScriptLoaded()
  17. {
  18. Int8 = 0;
  19. Int9 = 0;
  20. Group7 = System.getScriptGroup();
  21. if(( Group7 == Null)) {
  22. System.messageBox(( "titlebar\.maki\ can\ only\ run\ within\ a\ group"), ( "Error"), 0, ( ""));
  23. return Null;
  24. }
  25. GuiObject2 = Group7.findObject(System.getToken(System.getParam(), ( "\;"), 0));
  26. GuiObject4 = Group7.findObject(System.getToken(System.getParam(), ( "\;"), 1));
  27. if(( GuiObject4 != Null)) {
  28. Text5 = GuiObject4.findObject(( "window\.titlebar\.title"));
  29. Layer6 = GuiObject4.findObject(( "window\.titlebar\.title\.overlay"));
  30. }
  31. GuiObject3 = Group7.findObject(System.getToken(System.getParam(), ( "\;"), 2));
  32. return Null;
  33. }
  34.  
  35. Int Group7.onNotify(String command, String param, int a, int b)
  36. {
  37. String String24;
  38. String String25;
  39. String24 = System.getToken(command, ( "\,"), 0);
  40. String25 = System.getToken(command, ( "\,"), 1);
  41. if(( ( String24 == ( "padtitleright")) || ( String24 == ( "padtitleright")))) {
  42. System.onSetXuiParam(String24, String25);
  43. }
  44. return Null;
  45. }
  46.  
  47. System.onSetXuiParam(String param, String value)
  48. {
  49. if(( param == ( "padtitleright"))) {
  50. Int9 = ( Int9 + System.StringToInteger(value));
  51. func556();
  52. }
  53. if(( param == ( "padtitleleft"))) {
  54. Int8 = ( Int8 + System.StringToInteger(value));
  55. func556();
  56. }
  57. return Null;
  58. }
  59.  
  60. func556()
  61. {
  62. Int Int34;
  63. Int Int32;
  64. Layout Layout33;
  65. Int Int30;
  66. Int Int31;
  67. Int30 = 0;
  68. Int31 = 0;
  69. Int32 = Group7.getWidth();
  70. Layout33 = Group7.getParentLayout();
  71. Int31 = Layout33.getWidth();
  72. if(( GuiObject4 != Null)) {
  73. Int30 = GuiObject4.getAutoWidth();
  74. }
  75. Int34 = ( ( Int31 - Int30) / 2);
  76. Int34 = Layout33.clientToScreenX(Int34);
  77. Int34 = Group7.screenToClientX(Int34);
  78. Int34 = ( Int34 - Group7.getLeft());
  79. if(( GuiObject4 != Null)) {
  80. GuiObject4.setXmlParam(( "x"), System.integerToString(Int34));
  81. GuiObject4.setXmlParam(( "relatx"), ( "0"));
  82. GuiObject4.setXmlParam(( "w"), System.integerToString(Int30));
  83. GuiObject4.setXmlParam(( "relatw"), ( "0"));
  84. Layer6.setXmlParam(( "x"), System.integerToString(Int34));
  85. Layer6.setXmlParam(( "relatx"), ( "0"));
  86. Layer6.setXmlParam(( "w"), System.integerToString(Int30));
  87. Layer6.setXmlParam(( "relatw"), ( "0"));
  88. }
  89. if(( GuiObject2 != Null)) {
  90. GuiObject2.setXmlParam(( "x"), System.integerToString(Int8));
  91. GuiObject2.setXmlParam(( "relatx"), ( "0"));
  92. GuiObject2.setXmlParam(( "w"), System.integerToString(( ( Int34 - Int8) - 0)));
  93. GuiObject2.setXmlParam(( "relatw"), ( "0"));
  94. }
  95. if(( GuiObject3 != Null)) {
  96. GuiObject3.setXmlParam(( "x"), System.integerToString(( ( ( Int34 + Int30) + 0) + 1)));
  97. GuiObject3.setXmlParam(( "relatx"), ( "0"));
  98. GuiObject3.setXmlParam(( "w"), ( ( "\-") + System.integerToString(( ( ( ( ( Int34 + Int30) + 1) + Int9) + 0) + 1))));
  99. GuiObject3.setXmlParam(( "relatw"), ( "1"));
  100. }
  101. return Null;
  102. }
  103.  
  104. Text5.onTextChanged(String newtxt)
  105. {
  106. func556();
  107. return Null;
  108. }
  109.  
  110. Group7.onResize(int x, int y, int w, int h)
  111. {
  112. func556();
  113. return Null;
  114. }
  115.  
  116.  
  117.