Re: Mouse in text mode

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tuesday 26 June 2001 14:55, pmosley at infoway.lib.nm.us wrote:

> Hi
> I am working on using a mouse in text mode,but I have a problem in the
> Lib doc rob says to scale down the cord for the get_mouse routine,but
> how do you do this????????

I believe the mouse returns the x and y position in pixels. Each character on 
the DOS text screen is 8 pixels wide, so if the mouse sez you are at  pixel
320, for example, you divide that by 8 and get 40, which would be the 40th.
character on the line. Same thing applies for the vertical, except the 
characters are taller than they are wide, and you have to account for the 
pixels between lines, as well. Maybe divide by 16?  

Regards,
Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu