Add(Button,11107905,420,294) { Left=130 Top=75 Point(Left) Point(Top) Point(Width) Point(Height) Point(MouseX) Point(MouseY) Point(doLeft) Point(doTop) Point(onMouseEnter) Point(onMouseLeave) link(onMouseEnter,8844111:doTimer,[]) link(onMouseLeave,8844111:doStop,[]) } Add(InlineCode,5837280,420,357) { WorkPoints=#6:doMove| EventPoints=#4:onZx|4:onZy| DataPoints=#2:tx|2:ty|6:twidth|7:tneight|3:tmx|3:tmy| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|12: public |3: |16: tx:THI_Event;|17: ty:THI_Event; |20: twidth:THI_Event;|21: tneight:THI_Event;|17: tmx:THI_Event;|17: tmy:THI_Event;|18: onZx:THI_Event;|21: onZy:THI_Event; |49: procedure doMove(var _Data:TData; Index:word);|0:|5: end;|0:|14:implementation|0:|30: procedure THiAsmClass.doMove;|49: var x, y, width, neight, mx, my, ny, nx:integer;|8: begin |29: x:= ReadInteger(_data, tx);|29: y:= ReadInteger(_data, ty);|37: width:= ReadInteger(_data, twidth);|39: neight:= ReadInteger(_data, tneight);|31: mx:= ReadInteger(_data, tmx);|31: my:= ReadInteger(_data, tmy);|62: if mx < width/2 then nx:= x + mx else nx:= x - (width - mx);|64: if my < neight/2 then ny:= y + my else ny:= y - (neight - my);|24: _hi_onEvent(onZx, nx);|26: _hi_onEvent(onZy, ny); |1: |1: |5: end;|1: |18:end. | link(onZx,11107905:doLeft,[(477,363)(477,331)(408,331)(408,300)]) link(onZy,11107905:doTop,[(477,370)(477,338)(408,338)(408,307)]) link(tx,11107905:Left,[]) link(ty,11107905:Top,[]) link(twidth,11107905:Width,[]) link(tneight,11107905:Height,[]) link(tmx,11107905:MouseX,[]) link(tmy,11107905:MouseY,[]) } Add(Timer,8844111,490,301) { Interval=1 Enable=1 link(onTimer,5837280:doMove,[(537,307)(537,405)(408,405)(408,363)]) }