Date: Thu, 2 Nov 2000 09:47:08 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Wim Cools cc: djgpp AT delorie DOT com Subject: Re: Mouse cursor in text-mode In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 1 Nov 2000, Wim Cools wrote: > I know that you can change the > mouse-arrow in graphics modes and that in SVGA modes you have to draw a > cursor by yourself but does somebody know how to change the mouse cursor in > text mode to a little white arrow or something. The text-mode mouse pointer can be any of the 256 characters supported by the current font. So what you might do is this: - copy the system font into a DOS buffer - modify one of the characters in the copied font to have the shape of an arrow - tell the mouse driver to use that character as the pointer, by defining appropriate screen and cursor masks passed to function 0Ah of Int 33h This will cause your users to lose one of the characters, so you had better choose one that is rarely needed. The above will not solve the problem of the mouse pointer being jumpy, i.e. it moves in character-position increments. If you want smooth movement at pixel resolution, like in graphics modes, you will have to turn off the pointer drawn by the mouse driver, and instead count the mickeys reported by, e.g., function 0Bh of Int 33h, and draw the pointer yourself. To that end, you will need to usurp 4 characters from the copied font, change them to represent a moving arrow given the motion counters reported by the mouse driver, and put all of the 4 characters around the current mouse position. As you see, this is a lot of trouble for such a small nicety. However, perhaps you will find a library which already does that (I myself don't know about such libraries). An example of copying a font and changing it, albeit for different purposes, can be found in the source distribution of the DJGPP library, v2/djlsr203.zip, in the file src/libc/pc_hw/co80/conio.h, in one of the subroutines of the function `_set_screen_lines'.