delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/03/16:17:59

From: "Gillepileptic" <inbox AT not-very-clever DOT no-spam DOT demon DOT co DOT uk>
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> <spGxnmK00WB=1335s0 AT andrew DOT cmu DOT edu> <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

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...
>
>
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019