csqc getmousepos
Moderator: InsideQC Admins
2 posts
• Page 1 of 1
csqc getmousepos
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?
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?
- scarypajamas
- Posts: 5
- Joined: Mon May 26, 2008 7:15 pm
- Code: Select all
setwantsmousemove(1);
Activates the Mouse for CSQC
You will need to set it to 1 when u want to turn on your menu.
- Code: Select all
setwantsmousemove(0);
Puts it back to normal
-Gif
- GiffE
- Posts: 170
- Joined: Sun Oct 08, 2006 3:39 pm
- Location: USA, CT
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest