Download file
-
TastiTouch.txt (645bytes)
Numero di downloads: 17
Messaggio modificato da Nick_7 il 28 febbraio 2010 - 20:25
Inviato 28 febbraio 2010 - 20:19
TastiTouch.txt (645bytes)
Messaggio modificato da Nick_7 il 28 febbraio 2010 - 20:25
Inviato 06 marzo 2010 - 09:28
use graph as g, proc as p, ui; ui.ptr(2); class tasto x; y; w; h; t; function init(x,y,w,h,t) this.x=x; this.y=y; this.w=w; this.h=h; this.t=t; end; function click(coo) if coo[0]>x and coo[0]<x+w and coo[1]>y and coo[1]<y+h and coo[2]=0 then return true; else return false; end; end; function show() g.rect(x,y,w,h); g.text(x+10,y+20,t); end; end; t_cerchio:tasto=tasto(10,50,300,40,"cerchio"); t_quadrato:tasto=tasto(10,100,300,40,"quadrato"); t_esci:tasto=tasto(10,150,300,40,"esci"); while true do t_cerchio.show(); t_quadrato.show(); t_esci.show(); g.show(); coo=ui.cmd(); if t_esci.click(coo) then p.stop(); end; end;
Inviato 06 marzo 2010 - 13:43
Messaggio modificato da Nick_7 il 06 marzo 2010 - 13:43
Inviato 07 marzo 2010 - 22:00
Inviato 08 marzo 2010 - 12:56
if coo[0]>x and coo[0]<x+w and coo[1]>y and coo[1]<y+h and coo[2]=0
if coo[0]>this.x and coo[0]<this.x+this.w and coo[1]>this.y and coo[1]<this.y+this.h and coo[2]=0
t_cerchio:tasto=tasto(10,50,300,40,"cerchio");
Inviato 15 marzo 2010 - 16:30
Pubblicità