Mouse cursor


(Skunk) #1

I’ve tried a few things but none of them work. In Q3 the mouse cursor is highlighting/selecting options from its center point. In ET the mouse cursor is an arrow and options are highlighted/selected at the tip of the arrow. I want to change the cursor to a crosshair and I want the cursor to behave like it does in Q3. My cursor image is 32x32 so I figured I could do a +16 on both X and Y. But I’m not sure where to edit the code.

Can anyone help?


(bacon) #2

Try changing all occurances of

CG_DrawPic( cgDC.cursorx, cgDC.cursory, 32, 32, cgs.media.cursorIcon );

to

CG_DrawPic( cgDC.cursorx + 16, cgDC.cursory, 32, 32, cgs.media.cursorIcon );

Then do the same for cursory
This is just a really simple solution and has some problems, but it should work fine for you.


(Skunk) #3

Try changing all occurances of
Code:
CG_DrawPic( cgDC.cursorx, cgDC.cursory, 32, 32, cgs.media.cursorIcon );

to
Code:
CG_DrawPic( cgDC.cursorx + 16, cgDC.cursory, 32, 32, cgs.media.cursorIcon );

Then do the same for cursory
This is just a really simple solution and has some problems, but it should work fine for you.

I tried out of curiosity although I thought it wouldn’t work. And it didn’t. I’m not sure that drawing is directly involved with what I want to do.

Trying that:

Display_MouseMove(NULL, uiInfo.uiDC.cursorx + 16, uiInfo.uiDC.cursory + 16);

in UI_MouseEvent (from ui_main.c) did manage to highlight menu elements correctly but the mouse click wouldn’t work anymore.