fb:porticula NoPaste
Eigne Cursor statt Standardmaus
Uploader: | AndT |
Datum/Zeit: | 01.12.2007 22:32:52 |
' Der Cursor muss noch mit Paint gepixelt werden (32x32)
SCREENRES 800,600,32
DIM AS ANY PTR cursor = IMAGECREATE (33,33)
DIM AS ANY PTR BILDPUFFER = IMAGECREATE (33,33)
DIM AS INTEGER CG = 32
BLOAD "cursor.bmp",cursor
DIM AS INTEGER mx,my,sc,mb
DIM AS INTEGER omx=320,omy=240
const p=50
CLS
SETMOUSE 100,100,0
'testhintergrund
FOR x AS INTEGER = 0 TO 800 STEP int(rnd * p)+1
FOR y AS INTEGER = 0 TO 600 STEP int(rnd * p)+1
LINE(x,y)-(x+p,y+p),RGB(INT(RND*256),INT(RND*256),INT(RND*256)),bf
NEXT
NEXT
GETMOUSE mx,my,sc
GET(mx,my)-(mx+CG,my+CG),bildpuffer
DO
GETMOUSE mx,my,sc,mb
' BildPuffer Holen
IF omx <> mx OR omy <> my THEN
PUT(omx,omy), bildpuffer, PSET
GET(mx,my)-(mx+cg,my+cg),bildpuffer
END IF
PUT (mx,my),cursor,TRANS
SLEEP 1
IF mx+cg > 800 OR my+cg > 600 THEN sc=-1
IF sc > -1 THEN
omx = mx
omy = my
END IF
if mb = 1 then locate 1,1:print point(mx-1,my-1)
LOOP UNTIL MULTIKEY(&h01)
SLEEP