home *** CD-ROM | disk | FTP | other *** search
/ Minami 49 / MINAMI49.ISO / Extra / winamp503_full.exe / Plugins / titlebar.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2003-06-22  |  3KB  |  111 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 Group Group6;
  10. Global Int Int7;
  11. Global Int Int8;
  12.  
  13. Function func534();
  14.  
  15. System.onScriptLoaded()
  16. {
  17. Int7 = 0;
  18. Int8 = 0;
  19. Group6 = System.getScriptGroup();
  20. if(( Group6 == Null)) {
  21. System.messageBox(( "titlebar\.maki\ can\ only\ run\ within\ a\ group"), ( "Error"), 0, ( ""));
  22. return Null;
  23. }
  24. GuiObject2 = Group6.findObject(System.getToken(System.getParam(), ( "\;"), 0));
  25. GuiObject4 = Group6.findObject(System.getToken(System.getParam(), ( "\;"), 1));
  26. if(( GuiObject4 != Null)) {
  27. Text5 = GuiObject4.findObject(( "window\.titlebar\.title"));
  28. }
  29. GuiObject3 = Group6.findObject(System.getToken(System.getParam(), ( "\;"), 2));
  30. return Null;
  31. }
  32.  
  33. Int Group6.onNotify(String command, String param, int a, int b)
  34. {
  35. String String23;
  36. String String22;
  37. String22 = System.getToken(command, ( "\,"), 0);
  38. String23 = System.getToken(command, ( "\,"), 1);
  39. if(( ( String22 == ( "padtitleright")) || ( String22 == ( "padtitleright")))) {
  40. System.onSetXuiParam(String22, String23);
  41. }
  42. return Null;
  43. }
  44.  
  45. System.onSetXuiParam(String param, String value)
  46. {
  47. if(( param == ( "padtitleright"))) {
  48. Int8 = ( Int8 + System.StringToInteger(value));
  49. func534();
  50. }
  51. if(( param == ( "padtitleleft"))) {
  52. Int7 = ( Int7 + System.StringToInteger(value));
  53. func534();
  54. }
  55. return Null;
  56. }
  57.  
  58. func534()
  59. {
  60. Int Int32;
  61. Int Int29;
  62. Int Int28;
  63. Layout Layout31;
  64. Int Int30;
  65. Int28 = 0;
  66. Int29 = 0;
  67. Int30 = Group6.getWidth();
  68. Layout31 = Group6.getParentLayout();
  69. Int29 = Layout31.getWidth();
  70. if(( GuiObject4 != Null)) {
  71. Int28 = GuiObject4.getAutoWidth();
  72. }
  73. Int32 = ( ( Int29 - Int28) / 2);
  74. Int32 = Layout31.clientToScreenX(Int32);
  75. Int32 = Group6.screenToClientX(Int32);
  76. Int32 = ( Int32 - Group6.getLeft());
  77. if(( GuiObject4 != Null)) {
  78. GuiObject4.setXmlParam(( "x"), System.integerToString(Int32));
  79. GuiObject4.setXmlParam(( "relatx"), ( "0"));
  80. GuiObject4.setXmlParam(( "w"), System.integerToString(Int28));
  81. GuiObject4.setXmlParam(( "relatw"), ( "0"));
  82. }
  83. if(( GuiObject2 != Null)) {
  84. GuiObject2.setXmlParam(( "x"), System.integerToString(Int7));
  85. GuiObject2.setXmlParam(( "relatx"), ( "0"));
  86. GuiObject2.setXmlParam(( "w"), System.integerToString(( ( Int32 - Int7) - 0)));
  87. GuiObject2.setXmlParam(( "relatw"), ( "0"));
  88. }
  89. if(( GuiObject3 != Null)) {
  90. GuiObject3.setXmlParam(( "x"), System.integerToString(( ( ( Int32 + Int28) + 0) + 1)));
  91. GuiObject3.setXmlParam(( "relatx"), ( "0"));
  92. GuiObject3.setXmlParam(( "w"), ( ( "\-") + System.integerToString(( ( ( ( ( Int32 + Int28) + 1) + Int8) + 0) + 1))));
  93. GuiObject3.setXmlParam(( "relatw"), ( "1"));
  94. }
  95. return Null;
  96. }
  97.  
  98. Text5.onTextChanged(String newtxt)
  99. {
  100. func534();
  101. return Null;
  102. }
  103.  
  104. Group6.onResize(int x, int y, int w, int h)
  105. {
  106. func534();
  107. return Null;
  108. }
  109.  
  110.  
  111.