Newsgroups: comp.os.msdos.djgpp Date: Wed, 23 Apr 1997 19:43:09 -0700 (PDT) From: rellwood To: Laszlo Vecsey cc: djgpp AT delorie DOT com Subject: Re: Mouse past edge of screen question In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 23 Apr 1997, Laszlo Vecsey wrote: > > For a particular problem that I am trying to solve, I want to set the > > boundry of the area that the mouse can scroll larger then the area of the > > screen. I'm using Allegro's mouse functions, but the one function that I > > would think should do it, set_mouse_range(int, int, int, int), only seems > > to be capable of setting the mouse range *smaller* then the screen, not > > bigger. > > One way to do it would be to use mouse ticks instead, and compute your own > logical offset that way. "mouse mickey's" I believe they're called. Why > exactly do you need to do this? Perhaps with some more details someone can > suggest a better solution. Well, here's my problem: I want the user to be able to scroll the screen by "pushing" against the edge of the screen with the pointer. Thus, I want to be able to determine how far the mouse has gone past the edge of the screen: I scroll the screen the same number of pixles as the mouse has moved past the edge, move the pointer back to the edge of the screen, and repeat for each frame. This way, I hope to attain a more fluid feel of scrolling around a large area, then that annoying system whereby the screen scrolls at the rate *it* want's to scroll when your pointer simply sits at the permiter of the screen, such as in Warcraft, SimCity, etc. Sorry I was so vague the first time. The "mouse mickey's" you mentioned sounds like a good possibility. How do I get at these mouse ticks? Or, any better ideas? Thanks a lot, Richard Ellwood