PDA

View Full Version : Showing cursor in graphics.h



sp00k
06-15-2002, 07:04 PM
The graphics libary automattically hide the cusor. I was just wondering if there is any way to show the cursor after you have decalred the graphics libary.

sean
06-15-2002, 07:36 PM
Couldn't you just force the cursor to appear with a function? Or use the assembler code for it - place it between asm { ...} tags. Or you could get the Screen cooridinates of where the cursor should be, and put something else there at those coordinates - something that looks like the cursor - I think it has an ascii value somwhere near 170...

Hillbillie
06-22-2002, 11:21 AM
The hardware cursor is only available in text mode. It's unavailable in graphics mode. However, like Sean said, you can make your own cursor with one of those block characters, or you can simply draw a filled rectangle where the cursor should be.

sean
06-22-2002, 04:17 PM
Drawing the cursor everytime time might take a wile, so you're probably just better off using the ascii char.

Hillbillie
06-22-2002, 05:09 PM
>Drawing the cursor everytime time might take a wile, so you're probably just better off using the ascii char.<

Actually, it wouldn't make a difference in speed really as the BGI takes care of writing text mode text in its graphics modes.

For example, try initializing graphics mode via the BIOS or just go straight to the VGA itself, and then try to cout or printf() something. It won't do anything.

sean
06-22-2002, 05:43 PM
So even if you specify already defined constants like characters - it still takes the same time?

Quantrizi
06-22-2002, 06:04 PM
Not what I thought.

Hillbillie
06-22-2002, 11:03 PM
>So even if you specify already defined constants like characters - it still takes the same time?<

The "constants" are simply bitmaps. In the end, BGI is just drawing pixels, so yeah it takes roughly the same time.

sean
06-23-2002, 05:30 PM
Oh...... yeah...... well actually that makes more sense!