blob: 9769a083a4be84f365ed684a89d9be826b92ab35 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*---------------------------------------------------
-----------------------------------------------------
Filename: syncbutton.m
Version: 1.0
Type: maki
Date: 25. Jun. 2007 - 14:04
Author: Martin Poehlmann aka Deimos
E-Mail: martin@skinconsortium.com
Internet: www.skinconsortium.com
www.martin.deimos.de.vu
-----------------------------------------------------
---------------------------------------------------*/
#include <lib/std.mi>
Global GuiObject mainButton, activeOverlay;
Global Boolean mouseDown;
Global Int activeOverlay_Y;
System.onScriptLoaded ()
{
mainButton = getScriptGroup().findObject(getToken(getParam(), ";", 0));
activeOverlay = getScriptGroup().findObject(getToken(getParam(), ";", 1));
activeOverlay_Y = activeOverlay.getGuiY();
mainButton.onsetvisible(mainButton.isvIsible());
}
mainButton.onLeftButtonDown (int x, int y)
{
mouseDown = 1;
activeOverlay.setXmlParam("y", integerToString(activeOverlay_Y+1));
}
mainButton.onLeftButtonUp (int x, int y)
{
mouseDown = 0;
activeOverlay.setXmlParam("y", integerToString(activeOverlay_Y));
}
mainButton.onleaveArea ()
{
activeOverlay.setXmlParam("y", integerToString(activeOverlay_Y));
}
mainButton.onEnterArea ()
{
if (mouseDown) activeOverlay.setXmlParam("y", integerToString(activeOverlay_Y+1));
}
mainButton.onSetVisible (Boolean onoff)
{
if (onoff) activeOverlay.show();
else activeOverlay.hide();
}
|