changeset 6961 | d5ac09894a1b |
parent 6957 | ab8034208fcd |
child 6962 | ec308eabe09b |
6960:822f8269e13f | 6961:d5ac09894a1b |
---|---|
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; |
25 uses sysutils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, uIO, GLUnit, uTypes, uCaptions, uAmmos, uWorld; |
26 |
26 |
27 |
27 |
28 procedure initModule; |
28 procedure initModule; |
29 |
29 |
30 procedure ProcessTouch; |
30 procedure ProcessTouch; |
31 procedure NewTurnBeginning; |
|
32 |
|
31 procedure onTouchDown(x,y: Longword; pointerId: TSDL_FingerId); |
33 procedure onTouchDown(x,y: Longword; pointerId: TSDL_FingerId); |
32 procedure onTouchMotion(x,y: Longword; dx,dy: LongInt; pointerId: TSDL_FingerId); |
34 procedure onTouchMotion(x,y: Longword; dx,dy: LongInt; pointerId: TSDL_FingerId); |
33 procedure onTouchUp(x,y: Longword; pointerId: TSDL_FingerId); |
35 procedure onTouchUp(x,y: Longword; pointerId: TSDL_FingerId); |
34 function convertToCursorX(x: LongInt): LongInt; |
36 function convertToCursorX(x: LongInt): LongInt; |
35 function convertToCursorY(y: LongInt): LongInt; |
37 function convertToCursorY(y: LongInt): LongInt; |
406 break; |
408 break; |
407 end; |
409 end; |
408 end; |
410 end; |
409 |
411 |
410 end; |
412 end; |
413 |
|
414 procedure NewTurnBeginning; |
|
415 begin |
|
416 targetted:= false; |
|
417 targetting:= false; |
|
418 SetUtilityWidgetState; |
|
419 end; |
|
420 |
|
411 |
421 |
412 procedure ProcessTouch; |
422 procedure ProcessTouch; |
413 var |
423 var |
414 deltaAngle: LongInt; |
424 deltaAngle: LongInt; |
415 begin |
425 begin |