Inside3D!
     

csqc getmousepos

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
scarypajamas



Joined: 26 May 2008
Posts: 5

PostPosted: Sun Jul 06, 2008 6:26 pm    Post subject: csqc getmousepos Reply with quote

I'm trying to use CSQC to make an in-game mouse controlled menu. The problem I have is when I try and get the mouse position with getmousepos() it keeps sending me back to 0,0. I figure quake keeps the mouse at 0,0 while in-game, but I want to be able to move it around.

I can't seem to find a command or figure out how to move the mouse around? Can someone shed some light on this? Do I have to mod the source?

My csqc code for the mouse is:


local vector mouse, msize;

mouse = getmousepos(); //should be letting me move mouse around but it keeps returning me to 0,0!

msize_x = 25;
msize_y = 25;
drawpic(mouse, "gfx/cursor", msize, '1 1 1', 1, 0);

// setwantsmousemove( 0 ); <-- do I need this?
Back to top
View user's profile Send private message
GiffE



Joined: 08 Oct 2006
Posts: 141
Location: USA, CT

PostPosted: Sun Jul 06, 2008 7:38 pm    Post subject: Reply with quote

Code:
setwantsmousemove(1);

Activates the Mouse for CSQC
You will need to set it to 1 when u want to turn on your menu.

Code:
setwantsmousemove(0);

Puts it back to normal

-Gif
_________________
http://www.giffe-bin.net/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group