home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 56
/
MINAMI56.ISO
/
Extra
/
winamp505_full.exe
/
Plugins
/
titlebar.maki
(
.txt
)
< prev
next >
Wrap
Winamp Compiled Maki Script
|
2003-06-22
|
3KB
|
111 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global GuiObject GuiObject2;
Global GuiObject GuiObject3;
Global GuiObject GuiObject4;
Global Text Text5;
Global Group Group6;
Global Int Int7;
Global Int Int8;
Function func534();
System.onScriptLoaded()
{
Int7 = 0;
Int8 = 0;
Group6 = System.getScriptGroup();
if(( Group6 == Null)) {
System.messageBox(( "titlebar\.maki\ can\ only\ run\ within\ a\ group"), ( "Error"), 0, ( ""));
return Null;
}
GuiObject2 = Group6.findObject(System.getToken(System.getParam(), ( "\;"), 0));
GuiObject4 = Group6.findObject(System.getToken(System.getParam(), ( "\;"), 1));
if(( GuiObject4 != Null)) {
Text5 = GuiObject4.findObject(( "window\.titlebar\.title"));
}
GuiObject3 = Group6.findObject(System.getToken(System.getParam(), ( "\;"), 2));
return Null;
}
Int Group6.onNotify(String command, String param, int a, int b)
{
String String22;
String String23;
String22 = System.getToken(command, ( "\,"), 0);
String23 = System.getToken(command, ( "\,"), 1);
if(( ( String22 == ( "padtitleright")) || ( String22 == ( "padtitleright")))) {
System.onSetXuiParam(String22, String23);
}
return Null;
}
System.onSetXuiParam(String param, String value)
{
if(( param == ( "padtitleright"))) {
Int8 = ( Int8 + System.StringToInteger(value));
func534();
}
if(( param == ( "padtitleleft"))) {
Int7 = ( Int7 + System.StringToInteger(value));
func534();
}
return Null;
}
func534()
{
Layout Layout31;
Int Int32;
Int Int30;
Int Int29;
Int Int28;
Int28 = 0;
Int29 = 0;
Int30 = Group6.getWidth();
Layout31 = Group6.getParentLayout();
Int29 = Layout31.getWidth();
if(( GuiObject4 != Null)) {
Int28 = GuiObject4.getAutoWidth();
}
Int32 = ( ( Int29 - Int28) / 2);
Int32 = Layout31.clientToScreenX(Int32);
Int32 = Group6.screenToClientX(Int32);
Int32 = ( Int32 - Group6.getLeft());
if(( GuiObject4 != Null)) {
GuiObject4.setXmlParam(( "x"), System.integerToString(Int32));
GuiObject4.setXmlParam(( "relatx"), ( "0"));
GuiObject4.setXmlParam(( "w"), System.integerToString(Int28));
GuiObject4.setXmlParam(( "relatw"), ( "0"));
}
if(( GuiObject2 != Null)) {
GuiObject2.setXmlParam(( "x"), System.integerToString(Int7));
GuiObject2.setXmlParam(( "relatx"), ( "0"));
GuiObject2.setXmlParam(( "w"), System.integerToString(( ( Int32 - Int7) - 0)));
GuiObject2.setXmlParam(( "relatw"), ( "0"));
}
if(( GuiObject3 != Null)) {
GuiObject3.setXmlParam(( "x"), System.integerToString(( ( ( Int32 + Int28) + 0) + 1)));
GuiObject3.setXmlParam(( "relatx"), ( "0"));
GuiObject3.setXmlParam(( "w"), ( ( "\-") + System.integerToString(( ( ( ( ( Int32 + Int28) + 1) + Int8) + 0) + 1))));
GuiObject3.setXmlParam(( "relatw"), ( "1"));
}
return Null;
}
Text5.onTextChanged(String newtxt)
{
func534();
return Null;
}
Group6.onResize(int x, int y, int w, int h)
{
func534();
return Null;
}