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
Wrap
Winamp Compiled Maki Script
|
2004-02-10
|
7KB
|
248 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global Container Container11;
Global Container Container12;
Global Layout Layout13;
Global Layout Layout14;
Global Text Text15;
Global Text Text16;
Global Text Text17;
Global Text Text18;
Global Text Text19;
Global Text Text20;
Global Text Text21;
Global Slider Slider22;
Global Slider Slider23;
Global Slider Slider24;
Global Slider Slider25;
Global GuiObject GuiObject26;
Global Timer Timer27;
Global Timer Timer28;
Global Int Int29;
Global Int Int30;
Global Int Int32;
Global Float Float33;
Global Float Float34;
Global Float Float35;
Function func1669();
Function func1820();
Function func2335();
Function func2591(Float 5.87747175411144e-39, Float 5.87747175411144e-39);
System.onScriptLoaded()
{
Layout Layout44;
Container11 = System.getContainer(( "opensource_notifier"));
Container12 = System.getContainer(( "opensource_notifier_prefs"));
Layout13 = Container11.getLayout(( "normal"));
Layout14 = Container11.getLayout(( "normal"));
Text15 = Layout13.findObject(( "artist"));
Text16 = Layout13.findObject(( "title"));
Text17 = Layout13.findObject(( "album"));
Text18 = Layout13.findObject(( "plentry"));
GuiObject26 = Layout13.findObject(( "shadow"));
Layout44 = Container12.getLayout(( "normal"));
Text19 = Layout44.findObject(( "fadein\.text"));
Text20 = Layout44.findObject(( "stay\.text"));
Text21 = Layout44.findObject(( "fadeout\.text"));
Slider22 = Layout44.findObject(( "fadein\.slider"));
Slider23 = Layout44.findObject(( "stay\.slider"));
Slider24 = Layout44.findObject(( "fadeout\.slider"));
Slider25 = Layout44.findObject(( "shadow\.slider"));
Float33 = System.getPrivateInt(( "OpenNote"), ( "FadeIn"), 6);
Float34 = System.getPrivateInt(( "OpenNote"), ( "FadeOut"), 2);
Float35 = System.getPrivateInt(( "OpenNote"), ( "Stay"), 16);
Int30 = System.getPrivateInt(( "OpenNote"), ( "shadow"), 255);
Timer27 = ( new Timer);
Timer28 = ( new Timer);
Timer28.setDelay(100);
Slider22.setPosition(Float33);
Slider24.setPosition(Float34);
Slider23.setPosition(Float35);
Slider25.setPosition(Int30);
Layout13.hide();
return Null;
}
System.onScriptUnloading()
{
System.setPrivateInt(( "OpenNote"), ( "FadeIn"), ( Float33 * 4));
System.setPrivateInt(( "OpenNote"), ( "FadeOut"), ( Float34 * 4));
System.setPrivateInt(( "OpenNote"), ( "Stay"), ( ( Float35 * 4) / 1000));
System.setPrivateInt(( "OpenNote"), ( "shadow"), Int30);
return Null;
}
Slider25.onSetPosition(int newpos)
{
GuiObject26.setAlpha(newpos);
Int30 = newpos;
return Null;
}
Slider22.onSetPosition(int newpos)
{
Text19.setText(( ( ( "Fade\-in\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float33 = ( newpos / 4);
return Null;
}
Slider24.onSetPosition(int newpos)
{
Text21.setText(( ( ( "Fade\-out\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float34 = ( newpos / 4);
return Null;
}
Slider23.onSetPosition(int newpos)
{
Text20.setText(( ( ( "Hold\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float35 = ( ( newpos / 4) * 1000);
Timer27.setDelay(Float35);
return Null;
}
System.onTitleChange(String newtitle)
{
Timer28.start();
return Null;
}
System.onPlay()
{
Timer28.start();
return Null;
}
System.onResume()
{
Timer28.start();
return Null;
}
Timer28.onTimer()
{
Timer28.stop();
func1669();
return Null;
}
Layout13.onLeftButtonDown(int x, int y)
{
Container12.show();
return Null;
}
Layout13.onRightButtonDown(int x, int y)
{
Layout13.hide();
return Null;
}
func1669()
{
String String78;
String78 = System.getPrivateString(( "OpenNote"), ( "Freq"), ( "Always\ Show\ Notifications"));
if(( String78 == ( "Always\ Show\ Notifications"))) {
func1820();
func2335();
func2591(Float33, Float34);
}
if(( ( String78 == ( "Show\ Notifications\ When\ Minimized")) && ( System.isMinimized() == 1))) {
func1820();
func2335();
func2591(Float33, Float34);
}
return Null;
}
func1820()
{
Int Int84;
String String86;
String String90;
String String81;
Int Int85;
String String80;
Int Int82;
String80 = System.integerToString(System.getPlaylistLength());
String81 = System.integerToString(System.getPlaylistIndex());
Int82 = ( System.getPlayItemLength() / 1000);
Int84 = ( Int82 / 60);
Int85 = ( Int82 - ( Int84 * 60));
if(( Int85 > 10)) {
String86 = ( ( "0") + System.integerToString(Int85));
} else {
String86 = System.integerToString(Int85);
}
String90 = ( ( System.integerToString(Int84) + ( "\:")) + String86);
Text15.setText(System.getPlayItemMetaDataString(( "artist")));
Text16.setText(( ( ( System.getPlayItemMetaDataString(( "title")) + ( "\ \(")) + String90) + ( "\)")));
if(( System.getPlayItemMetaDataString(( "track")) != ( "\-1"))) {
Text17.setText(( ( ( System.getPlayItemMetaDataString(( "album")) + ( "\ \(Track\ ")) + System.getPlayItemMetaDataString(( "track"))) + ( "\)")));
} else {
Text17.setText(System.getPlayItemMetaDataString(( "album")));
}
Text18.setText(( ( String81 + ( "\/")) + String80));
return Null;
}
func2335()
{
Int Int99;
Int Int98;
Int Int97;
Int97 = System.getViewportWidth();
Int98 = System.getViewportHeight();
Int99 = System.strlen(Text16.getText());
if(( Int99 >= 30)) {
Int32 = 210;
}
if(( ( Int99 < 30) && ( Int99 > 45))) {
Int32 = ( 210 + ( 7 * ( Int99 - 30)));
}
if(( Int99 <= 45)) {
Int32 = 320;
}
Int32 = 275;
Layout14.resize(( Int97 - Int32), ( Int98 - 85), Int32, 80);
return Null;
}
func2591(Float 5.87747175411144e-39, Float 5.87747175411144e-39)
{
Int29 = 1;
Layout13.show();
Layout13.setTargetA(255);
Layout13.setTargetSpeed(Float108);
Layout13.gotoTarget();
return Null;
}
Layout13.onTargetReached()
{
if(( Int29 == 1)) {
Timer27.start();
}
if(( Int29 == 2)) {
Layout13.hide();
}
return Null;
}
Timer27.onTimer()
{
Float Float109;
Timer27.stop();
Int29 = 2;
Layout13.setTargetA(0);
Layout13.setTargetSpeed(Float109);
Layout13.gotoTarget();
return Null;
}