1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<action name="draghotspot">
if(%1 != dragging,
spheretoscreen(hotspot[get(name)].point[0].ath, hotspot[get(name)].point[0].atv, hotspotcenterx, hotspotcentery);
sub(drag_adjustx, mouse.stagex, hotspotcenterx);
sub(drag_adjusty, mouse.stagey, hotspotcentery);
draghotspot(dragging);
,
if(pressed,
sub(dx, mouse.stagex, drag_adjustx);
sub(dy, mouse.stagey, drag_adjusty);
screentosphere(dx, dy, new_ath, new_atv);
sub(ath_diff,hotspot[get(name)].point[0].ath,new_ath);sub(atv_diff,hotspot[get(name)].point[0].atv,new_atv);
sub(hotspot[get(name)].point[0].ath,ath_diff);sub(hotspot[get(name)].point[0].atv,atv_diff);
sub(hotspot[get(name)].point[1].ath,ath_diff);sub(hotspot[get(name)].point[1].atv,atv_diff);
sub(hotspot[get(name)].point[2].ath,ath_diff);sub(hotspot[get(name)].point[2].atv,atv_diff);
sub(hotspot[get(name)].point[3].ath,ath_diff);sub(hotspot[get(name)].point[3].atv,atv_diff);
sub(hotspot[get(name)].point[4].ath,ath_diff);sub(hotspot[get(name)].point[4].atv,atv_diff);
delayedcall(0, draghotspot(dragging) );
);
);
</action>
|