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/hoverstimulate.m | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/resources/skins/Big Bento/scripts/hoverstimulate.m')
-rw-r--r-- | Src/resources/skins/Big Bento/scripts/hoverstimulate.m | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/Src/resources/skins/Big Bento/scripts/hoverstimulate.m b/Src/resources/skins/Big Bento/scripts/hoverstimulate.m new file mode 100644 index 00000000..5b337ef8 --- /dev/null +++ b/Src/resources/skins/Big Bento/scripts/hoverstimulate.m @@ -0,0 +1,83 @@ +/*--------------------------------------------------- +----------------------------------------------------- +Filename: hoverstimulate.m +Version: 1.0 + +Type: maki +Date: 03. Jul. 2007 - 23:09 +Author: Martin Poehlmann aka Deimos +E-Mail: martin@skinconsortium.com +Internet: www.skinconsortium.com + www.martin.deimos.de.vu +----------------------------------------------------- +---------------------------------------------------*/ + +#include <lib/std.mi> + +Global Button mainButton; +Global Layer overlay; +Global Boolean mouseDown; +Global String img_normal, img_hover, img_down, img_active; + +System.onScriptLoaded () +{ + mainButton = getScriptGroup().findObject(getToken(getParam(), ";", 0)); + overlay = getScriptGroup().findObject(getToken(getParam(), ";", 1)); + img_normal = getToken(getParam(), ";", 2); + img_hover = getToken(getParam(), ";", 3); + img_down = getToken(getParam(), ";", 4); + img_active = getToken(getParam(), ";", 5); +} + +mainButton.onSetVisible (Boolean onoff) +{ + if (onoff) + { + overlay.show(); + } + else + { + overlay.hide(); + } +} + +mainButton.onLeftButtonDown (int x, int y) +{ + mouseDown = 1; + if (img_down != "NULL") overlay.setXmlParam("image", img_down); +} + +mainButton.onLeftButtonUp (int x, int y) +{ + mouseDown = 0; + if (img_hover != "NULL" && !getActivated() && isMouseOverRect()) overlay.setXmlParam("image", img_hover); +} + +mainButton.onleaveArea () +{ + if (!getActivated()) + { + if (img_normal != "NULL") overlay.setXmlParam("image", img_normal); + } + else + { + if (img_active != "NULL") overlay.setXmlParam("image", img_active); + } +} + +mainButton.onEnterArea () +{ + if (img_hover != "NULL") overlay.setXmlParam("image", img_hover); +} + +mainButton.onActivate (int activated) +{ + if (activated) + { + if (img_active != "NULL") overlay.setXmlParam("image", img_active); + } + else + { + if (img_normal != "NULL") overlay.setXmlParam("image", img_normal); + } +}
\ No newline at end of file |