Показать сообщение отдельно
Старый 15.05.2010, 12:46   #26
Rock2roll
Знающий
 
Аватар для Rock2roll
 
Регистрация: 14.05.2010
Сообщений: 297
Написано 13 полезных сообщений
(для 13 пользователей)
Ответ: Помогите с boolean!!!

Program LaFull;
Var int,log,mouse,tab,ping:image;
w,h,key,x,y:integer;
bulLogin,bulMouse,bulPing:boolean;

Procedure Pings;
begin
drawImage(int,0,0);
drawImage(ping,w-85,h-69);
repaint;
end;

Procedure mouseX;
begin
Key:=KeyToAction(getKeyPressed);
if (Key=GA_LEFT) then X:=X-2;
if (Key=GA_RIGHT) then X:=X+2;
if (Key=GA_UP) then Y:=Y-2;
if (Key=GA_DOWN) then Y:=Y+2;
if x<0 then x:=0;
if y<0 then y:=0;
if y>getheight-5 then y:=getheight-5;
if x>getwidth-5 then x:=getwidth-5;
drawImage(mouse,x,y);
repaint;
end;

Procedure login;
begin
repeat
drawImage(int,0,0);
drawImage(log,w-98,h-31);
drawImage(tab,getwidth-118,getheight-86);

repaint;
if (x>45) and (y>185) and (x<115) and (y<200) and (KeyToAction(getKeyPressed)=GA_FIRE) then
bulPing:=true;
until (x>-100) and (y>-100) and (x<-50) and (y<-50) and (KeyToAction(getKeyPressed)=GA_FIRE);
end;

Procedure data;
begin
x:=getwidth/2; y:=getheight/2;
w:=getwidth/2; h:=getheight/2;
bulMouse:=true;
bulLogin:=true;
bulPing:=false;

int:=LoadImage('/int.png');
log:=loadimage('/log.png');
mouse:=loadimage('/mouse.png');
tab:=loadimage('/tab.png');
ping:=LoadImage('/ping.png');

if (bulPing=true) then bulLogin:=false;
if (bulMouse=true) then mouseX;
if (bulLogin=true) then login;
if (bulPing=true) then Pings;

end;

begin
data;
end.

Почему не двигается мышь?, та которая mouse? И как задержать процедуру без делай норм?
__________________
G502, GT S5230w user!
(Offline)
 
Ответить с цитированием