diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/resources/skins/Big Bento/scripts/lib | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/resources/skins/Big Bento/scripts/lib')
-rw-r--r-- | Src/resources/skins/Big Bento/scripts/lib/debug.m | 52 | ||||
-rw-r--r-- | Src/resources/skins/Big Bento/scripts/lib/glow.m | 111 |
2 files changed, 163 insertions, 0 deletions
diff --git a/Src/resources/skins/Big Bento/scripts/lib/debug.m b/Src/resources/skins/Big Bento/scripts/lib/debug.m new file mode 100644 index 00000000..cca40f07 --- /dev/null +++ b/Src/resources/skins/Big Bento/scripts/lib/debug.m @@ -0,0 +1,52 @@ +/*--------------------------------------------------- +----------------------------------------------------- +Filename: debug.m +Version: 1.2 + +Type: maki/attrib loader +Date: 29. Aug. 2006 - 23:43 +Author: Martin Poehlmann aka Deimos +E-Mail: martin@skinconsortium.com +Internet: www.skinconsortium.com + www.martin.deimos.de.vu +----------------------------------------------------- +---------------------------------------------------*/ + +#ifndef included +#error This script can only be compiled as a #include +#endif + +#ifndef DEBUG +#define debugString // +#endif + +#ifdef DEBUG + +#define DEBUG_PREFIX "["+ FILE_NAME +": " + getTimeStamp() + "] " + + +Function String getTimeStamp(); +String getTimeStamp() +{ + int msc = getTimeOfDay(); + int h = msc / 1000 / 3600; + msc -= h * 1000 * 3600; + int m = msc / 1000 / 60; + msc -= m * 1000 * 60; + int s = msc / 1000; + msc -= s * 1000; + string zeros = ""; + if (msc < 100) + { + zeros += "0"; + } + if (msc < 10) + { + zeros += "0"; + } + return integerToString(h)+":"+integerToString(m)+":"+integerToString(s)+"."+zeros+integerToString(msc); +} + +#define D_WTF 9 +#define D_NWTF 9 + +#endif
\ No newline at end of file diff --git a/Src/resources/skins/Big Bento/scripts/lib/glow.m b/Src/resources/skins/Big Bento/scripts/lib/glow.m new file mode 100644 index 00000000..12e0406b --- /dev/null +++ b/Src/resources/skins/Big Bento/scripts/lib/glow.m @@ -0,0 +1,111 @@ +/*--------------------------------------------------- +----------------------------------------------------- +Filename: glow.m +Version: 1.0 + +Type: maki/glow class +Date: 16. Jun. 2007 - 23:13 +Author: Martin Poehlmann aka Deimos +E-Mail: martin@skinconsortium.com +Internet: www.skinconsortium.com + www.martin.deimos.de.vu + +Usage: 1: #include glow.m + 2: #define GLOW_OBJECT MyGlow + 3: call _MyGlow_GlowInit (someObj, otherObj) + to init the objects. + You can also call _MyGlow_GlowInit (NULL, otherObj) + and load a bunch of GuiObjects in _MyGlow_GlowTrigger + or load up to 5 objects via _MyGlow_addTarget(obj); + +----------------------------------------------------- +---------------------------------------------------*/ + +#ifndef included +#error This script can only be compiled as a #include +#endif + +#ifndef GLOW_OBJECT +#error GLOW_OBJECT not defined! +#endif + +Class GuiObject _##GLOW_OBJECT##_GlowTrigger; +Global _##GLOW_OBJECT##_GlowTrigger _##GLOW_OBJECT##_trigger0, _##GLOW_OBJECT##_trigger1, _##GLOW_OBJECT##_trigger2, _##GLOW_OBJECT##_trigger3, _##GLOW_OBJECT##_trigger4, _##GLOW_OBJECT##_trigger5; +Global GuiObject _##GLOW_OBJECT##_glow; +Global float _##GLOW_OBJECT##_fdoutspeed; +Global boolean _##GLOW_OBJECT##_mouseDown; + +Function _##GLOW_OBJECT##_GlowInit (GuiObject triggerObject, GuiObject glowObject, float fdoutspeed); +Function _##GLOW_OBJECT##_addTrigger (GuiObject triggerObject); + +_##GLOW_OBJECT##_GlowInit (GuiObject triggerObject, GuiObject glowObject, float fdoutspeed) +{ + if (triggerObject) _##GLOW_OBJECT##_trigger0 = triggerObject; + if (glowObject) _##GLOW_OBJECT##_glow = glowObject; + + _##GLOW_OBJECT##_fdoutspeed = fdoutspeed; +} + +_##GLOW_OBJECT##_addTrigger(GuiObject triggerObject) +{ + if (triggerObject) + { + if (!_##GLOW_OBJECT##_trigger1) + { + _##GLOW_OBJECT##_trigger1 = triggerObject; + return; + } + if (!_##GLOW_OBJECT##_trigger2) + { + _##GLOW_OBJECT##_trigger2 = triggerObject; + return; + } + if (!_##GLOW_OBJECT##_trigger3) + { + _##GLOW_OBJECT##_trigger3 = triggerObject; + return; + } + if (!_##GLOW_OBJECT##_trigger4) + { + _##GLOW_OBJECT##_trigger4 = triggerObject; + return; + } + if (!_##GLOW_OBJECT##_trigger5) + { + _##GLOW_OBJECT##_trigger5 = triggerObject; + return; + } + } +} + +_##GLOW_OBJECT##_GlowTrigger.onEnterArea () +{ + _##GLOW_OBJECT##_glow.cancelTarget(); + _##GLOW_OBJECT##_glow.setAlpha(255); +} + +_##GLOW_OBJECT##_GlowTrigger.onLeftButtonDown (int x, int y) +{ + _##GLOW_OBJECT##_mouseDown = 1; + _##GLOW_OBJECT##_glow.cancelTarget(); + _##GLOW_OBJECT##_glow.setAlpha(0); +} + +_##GLOW_OBJECT##_GlowTrigger.onLeftButtonUp (int x, int y) +{ + _##GLOW_OBJECT##_mouseDown = 0; + _##GLOW_OBJECT##_glow.cancelTarget(); + if (_##GLOW_OBJECT##_GlowTrigger.isMouseOverRect()) _##GLOW_OBJECT##_glow.setAlpha(255); +} + +_##GLOW_OBJECT##_GlowTrigger.onLeaveArea () +{ + if (_##GLOW_OBJECT##_mouseDown) return; + _##GLOW_OBJECT##_glow.cancelTarget(); + _##GLOW_OBJECT##_glow.setTargetA(0); + _##GLOW_OBJECT##_glow.setTargetX(_##GLOW_OBJECT##_glow.getGuiX()); + _##GLOW_OBJECT##_glow.setTargetSpeed(_##GLOW_OBJECT##_fdoutspeed); + _##GLOW_OBJECT##_glow.gotoTarget(); +} + +#undef GLOW_OBJECT
\ No newline at end of file |