diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/resources/skins/Big Bento/scripts/imagecontrol.m | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/resources/skins/Big Bento/scripts/imagecontrol.m')
-rw-r--r-- | Src/resources/skins/Big Bento/scripts/imagecontrol.m | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/Src/resources/skins/Big Bento/scripts/imagecontrol.m b/Src/resources/skins/Big Bento/scripts/imagecontrol.m new file mode 100644 index 00000000..fb12f445 --- /dev/null +++ b/Src/resources/skins/Big Bento/scripts/imagecontrol.m @@ -0,0 +1,99 @@ +/*--------------------------------------------------- +----------------------------------------------------- +Filename: imagecontrol.m +Version: 1.0 + +Type: maki +Date: 29. Jun. 2007 - 12:28 +Author: Martin Poehlmann aka Deimos +E-Mail: martin@skinconsortium.com +Internet: www.skinconsortium.com + www.martin.deimos.de.vu +----------------------------------------------------- +---------------------------------------------------*/ + +#include <lib/std.mi> +#include <lib/config.mi> + +Function updateAttrib (); +Class ConfigAttribute ImageAttribute; + +Global ImageAttribute a1, a2, a3, a4, a5, a6; +Global String img1, img2, img3, img4, img5, img6; +Global layer Display; +Global boolean myChange; + +System.onScriptLoaded () +{ + string param = getParam(); + + string objects = getToken(param, "|", 0); + group scriptGroup = getScriptGroup(); + Display = scriptGroup.findObject(objects); + + + int n = stringToInteger(getToken(param, "|", 1)) + 1; + int i = 2; + if (i <= n) + { + objects = getToken(param, "|", i); + a1 = config.getItemByGuid(getToken(objects, ";", 0)).getattribute(getToken(objects, ";", 1)); + img1 = getToken(objects, ";", 2); + i++; + } + if (i <= n) + { + objects = getToken(param, "|", i); + a2 = config.getItemByGuid(getToken(objects, ";", 0)).getattribute(getToken(objects, ";", 1)); + img2 = getToken(objects, ";", 2); + i++; + } + if (i <= n) + { + objects = getToken(param, "|", i); + a3 = config.getItemByGuid(getToken(objects, ";", 0)).getattribute(getToken(objects, ";", 1)); + img3 = getToken(objects, ";", 2); + i++; + } + if (i <= n) + { + objects = getToken(param, "|", i); + a4 = config.getItemByGuid(getToken(objects, ";", 0)).getattribute(getToken(objects, ";", 1)); + img4 = getToken(objects, ";", 2); + i++; + } + if (i <= n) + { + objects = getToken(param, "|", i); + a5 = config.getItemByGuid(getToken(objects, ";", 0)).getattribute(getToken(objects, ";", 1)); + img5 = getToken(objects, ";", 2); + i++; + } + if (i <= n) + { + objects = getToken(param, "|", i); + a6 = config.getItemByGuid(getToken(objects, ";", 0)).getattribute(getToken(objects, ";", 1)); + img6 = getToken(objects, ";", 2); + i++; + } + + updateAttrib (); +} + +ImageAttribute.onDataChanged () +{ + if (myChange) return; + updateAttrib (); +} + +updateAttrib () +{ + myChange = 1; + if (a1) if (a1.getData() == "1") Display.setXmlParam("image", img1); + if (a2) if (a2.getData() == "1") Display.setXmlParam("image", img2); + if (a3) if (a3.getData() == "1") Display.setXmlParam("image", img3); + if (a4) if (a4.getData() == "1") Display.setXmlParam("image", img4); + if (a5) if (a5.getData() == "1") Display.setXmlParam("image", img5); + if (a6) if (a6.getData() == "1") Display.setXmlParam("image", img6); + myChange = 0; +}
\ No newline at end of file |