From: "Gillepileptic" Newsgroups: comp.os.msdos.djgpp Subject: Re: Hotspots and mouse. Date: Sun, 3 May 1998 19:00:54 +0100 Message-ID: <894221730.9702.0.nnrp-03.c1edaebc@news.demon.co.uk> References: <894150254 DOT 19440 DOT 0 DOT nnrp-04 DOT c1edaebc AT news DOT demon DOT co DOT uk> <894221111 DOT 9401 DOT 0 DOT nnrp-03 DOT c1edaebc AT news DOT demon DOT co DOT uk> NNTP-Posting-Host: not-very-clever.demon.co.uk Lines: 42 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Gilleleptic wrote in message <894221111 DOT 9401 DOT 0 DOT nnrp-03 DOT c1edaebc AT news DOT demon DOT co DOT uk>... > >James W Sager Iii wrote in message ... > >>Thats exactly how you do it :) >>Its quite easy. The most important thing to remember is >>to store >>int x=mouse_x; >>int y=mouse_y; >>int b=mouse_b; >> >>whenever you want to check a certain click. >> >>Then do all your checking from these integers. >>If you continually poll the mouse variables >>you let yourself up to get weird unreproducable bugs. >> >>Ie if mouse_x is in range(x>20 and x<40) >>do some stuff and then >>do something based on mouse_x. It is wrong to >>assume that mouse_x will still be in the range of 20,40 >> >Thanks for the advice. I ended up with a bigger problem, because my bitmaps >were overlapping the mouse pointer, and the most obvious solution caused >flickering. For the benefit of other newbies, the way round this is to set >up a flag system, where the loop un-draws the mouse, blits a sprite, and >redraws the mouse only if something's changed. > > > >Gillepileptic Oops...Pushy Broad (The name attached to my previous post) is my Girlfriend's User name. Damn Outlook express... > > >