Проблема. Телефон не реагирует на клики по сенсорному экрану
Quote
program NewProject3;
Uses sensor;
Var i,x,y,x2,y2,x22,t,s, state, pointer_pressed_x, pointer_state: integer;
begin
sensor.init;
drawImage(loadImage('/logo02.png'), 0, 0);
repaint;
delay(2000);
drawImage(loadImage('/road.png'), 0, 0);
repaint;
x:=128;
x22:=0;
x2:=getWidth/2-53/2;
y2:=128-34;
randomize;
y:=random(1)+10;
for i:=1 to getWidth do begin
if s=6 then begin setColor(255, 0, 0); drawText('* * * You won! * * *', 10, getheight/2-4); repaint; delay(2000);halt; end;
state:=pointer_state;
if state=1 then Halt;
delay(70);
x:=x-3;
if (x<-50) then begin x:=getWidth; i:=1; y:=random(10); end;
drawImage(loadImage('/road2.png'),0, 27);
if (x2>0) and (x22=-5) then x2:=x2+x22;
if (x2+53<getWidth) and (x22=5) then x2:=x2+x22;
drawImage(loadImage('/avto.png'), x2, y2);
y:=y+1;
if (keyToAction(getKeyPressed) =GA_UP) then y2:=y2-5;
if (keyToAction(getKeyPressed) =GA_LEFT) then x22:=-5;
if (keyToAction(getKeyPressed) =GA_RIGHT) then x22:=5;
if (odd(x)=TRUE) then drawImage(loadImage('/bab01.png'), x, y); else drawImage(loadImage('/bab02.png'), x, y);
if (x+16>x2) and (x<x2+53) and (y+45>y2) then begin x:=getWidth; s:=s+1; drawImage(loadImage('/counter.png'), s*10-12, -1); y:=random(1)+10;i:=1;repaint; end;
repaint;
end;
end.