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
|
<events name="showcoords" keep="true" onkeydown="ShowCoords();" onviewchange="NumDoMouse();" />
<style name="coords" keep="true" type="text" width="150" height="40" bgroundedge="20" bgcolor="0xffffff" html="" css="data:css_mouse" ox="20" oy="-50" vcenter="true" />
<data name="css_mouse">
font-family:Helvetica;font-size:13px;color:#000000;text-align:center;
</data>
<action name="ShowCoords">
if(keycode == 77,
ifnot(_mouse,
addlayer(mouse);
layer[mouse].loadstyle(coords);
set(_mouse, true);
,
removelayer(mouse);
set(_mouse, false);
);
);
if(keycode == 80, Print());
</action>
<action name="NumDoMouse" >
setinterval(time, 0.02,
screentosphere(mouse.x, mouse.y, toh, tov);
roundval(toh,7);
roundval(tov,7);
set(layer[mouse].html, calc:'ATH = ' + toh + '[br]ATV = ' + tov);
copy(layer[mouse].x, mouse.x);
copy(layer[mouse].y, mouse.y);
);
</action>
<action name="Print">
showlog();
trace('Mouse X = ',get(toh),'
Mouse Y = ',get(tov));
</action>
|