Главная
Регистрация
Вход
Авторизироваться
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Модератор форума: ADMIN, Nextik  
Форум » MidletPascal » Делимся! » Lib_sensor.class (Где скачать?)
Lib_sensor.class
vlad275Дата: Среда, 21.09.2011, 22:53 | Сообщение # 1
Группа: Удаленные





Хочу переписать свою старую игрушку разработанную на WTK так чтобы она поддерживала тач-скрин. Портировать на мобильник с тач-скрином 128x128 собираюсь на Midlet Pascal'e
Подскажите пожалуйста где скачать регистрационный номер и имя, а также, Lib_sensor.class?
Мануал скачал http://mysotik.net/component/option,com_remository/Itemid,44/func,download/id,53/chk,674662e1860c69a4d385cac5d1640e78/no_html,1/
Сам паскаль тоже http://sitenext.ucoz.ru/_ld/0/36_LoPC-Midlet.pdf
 
NextikДата: Четверг, 22.09.2011, 17:34 | Сообщение # 2
Программист
Группа: Проверенные
Сообщений: 273
Награды: 0
Репутация: « 42 »
Статус: Offline
Quote (vlad275)
Сам паскаль тоже http://sitenext.ucoz.ru/_ld/0/36_LoPC-Midlet.pdf
ну там не среда разработки ведь, а электронный журнал - справочник. Регистрационный номер и имя не к чему, никаких изменений не произойдет все равно, насчет либ сенсор, поищи тут: http://forum.boolean.name/showthread.php?t=5494 там этих либ ой как много, найдеш все что нужно
 
vlad275Дата: Четверг, 22.09.2011, 18:42 | Сообщение # 3
Группа: Удаленные





Спасибо. Поищу.
 
vlad275Дата: Пятница, 23.09.2011, 06:38 | Сообщение # 4
Группа: Удаленные





http://mobilepascal.ru/_ld/0/37_Lib_sensormobil.zip

Quote
pointer_dragged_x and pointer_dragged_y may return with very-very old values.
example: if you dragged and released the pointer and then you are only clicking somewhere on the screen the dragging coordinates remains unchanged, so if you try to drag the pointer again these functions will first give the old coordinates of the previous dragging. this way drawing a line from the start of actual dragging to the end of actual dragging will start from false coordinates.

I suggest a patch for Lib_sensor.java:

protected void pointerPressed(int i, int j)
{
PX = i;
PY = j;
DX = i;
DY = j;
pressed = 1;
}

TESTED, and works right for me...

http://mobilepascal.ru/load/56-1-0-37


Сообщение отредактировал vlad275 - Пятница, 23.09.2011, 09:00
 
NextikДата: Пятница, 23.09.2011, 16:45 | Сообщение # 5
Программист
Группа: Проверенные
Сообщений: 273
Награды: 0
Репутация: « 42 »
Статус: Offline
на этом сайте либы не разрабатываются, не совершенствуются, всё что здесь есть, очень старовато
 
vlad275Дата: Вторник, 27.09.2011, 16:44 | Сообщение # 6
Группа: Удаленные





Проблема. Телефон не реагирует на клики по сенсорному экрану

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.


Сообщение отредактировал vlad275 - Вторник, 27.09.2011, 16:45
 
NextikДата: Вторник, 27.09.2011, 16:57 | Сообщение # 7
Программист
Группа: Проверенные
Сообщений: 273
Награды: 0
Репутация: « 42 »
Статус: Offline
у тебя работает всё кроме нажатия на сенсор я так понимаю?
 
vlad275Дата: Вторник, 27.09.2011, 18:32 | Сообщение # 8
Группа: Удаленные





Да
 
Форум » MidletPascal » Делимся! » Lib_sensor.class (Где скачать?)
  • Страница 1 из 1
  • 1
Поиск: