changeset 7237 | 1bbe31e0d707 |
parent 7185 | 92a045156255 |
child 7246 | 7773a1c92e1b |
7233:225179f64fd8 | 7237:1bbe31e0d707 |
---|---|
20 |
20 |
21 unit uTouch; |
21 unit uTouch; |
22 |
22 |
23 interface |
23 interface |
24 |
24 |
25 uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, uIO, GLUnit, uTypes, uCaptions, uAmmos, uWorld; |
25 uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, uIO, GLUnit, uTypes, uCaptions, uAmmos, uWorld, uMobile; |
26 |
26 |
27 |
27 |
28 procedure initModule; |
28 procedure initModule; |
29 |
29 |
30 procedure ProcessTouch; |
30 procedure ProcessTouch; |
555 y := 0; |
555 y := 0; |
556 convertToFingerCoord(x, y, CrosshairX, CrosshairY); |
556 convertToFingerCoord(x, y, CrosshairX, CrosshairY); |
557 isOnCrosshair:= isOnRect((x-HalfRectSize), (y-HalfRectSize), RectSize, RectSize, finger); |
557 isOnCrosshair:= isOnRect((x-HalfRectSize), (y-HalfRectSize), RectSize, RectSize, finger); |
558 printFinger(finger); |
558 printFinger(finger); |
559 WriteLnToConsole(inttostr(finger.x) + ' ' + inttostr(x)); |
559 WriteLnToConsole(inttostr(finger.x) + ' ' + inttostr(x)); |
560 WriteLnToConsole(inttostr(x) + ' ' + inttostr(y) + ' ' + inttostr(round(Android_JNI_getDensity() * 10))); |
560 WriteLnToConsole(inttostr(x) + ' ' + inttostr(y) + ' ' + inttostr(round(uMobile.getScreenDPI * 10))); |
561 end; |
561 end; |
562 |
562 |
563 function isOnCurrentHog(finger: TTouch_Data): boolean; |
563 function isOnCurrentHog(finger: TTouch_Data): boolean; |
564 var |
564 var |
565 x,y : LongInt; |
565 x,y : LongInt; |