metaldc4life Posted September 14, 2014 Share Posted September 14, 2014 Hi, I got my program (my game up and running for the first time in visual studio) but the mouse locks into the bottom right of the screen.. I am certain I have to modify this part of the script but I need help with what to place there.. //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth() / 2, context->GetHeight() / 2); Thanks! Quote Link to comment Share on other sites More sharing options...
Josh Posted September 14, 2014 Share Posted September 14, 2014 There are lots of little example programs you can run in the documentation: Command Reference Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
metaldc4life Posted September 14, 2014 Author Share Posted September 14, 2014 what I meant to put is that when I run the program it locks the mouse and I can't unlock it unless I ctrl+alt+Delete to end the program that way and I don't know how to take that function out or where to take it out from.. thank you for that useful link too! Quote Link to comment Share on other sites More sharing options...
metaldc4life Posted September 14, 2014 Author Share Posted September 14, 2014 i just noticed what i put didn't make much sense lol sorry the main problem is i need help finding out what function to place so the mouse won't lock in the bottom right of the screen when the program is launched... Quote Link to comment Share on other sites More sharing options...
Guppy Posted September 14, 2014 Share Posted September 14, 2014 It should lock to the centre of the screen, are you using multiple monitors? Also hitting escape or alt+F4 exits the program Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
metaldc4life Posted September 14, 2014 Author Share Posted September 14, 2014 no I have a laptop i'm using, this is the script that might have to be changed but i'm not sure: //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth() / 2, context->GetHeight() / 2); Quote Link to comment Share on other sites More sharing options...
Guppy Posted September 14, 2014 Share Posted September 14, 2014 Yes that is the part that centres the mouse. Notice that it uses the context size divided by 2 (=the mid point of both sizes) So off the mouse is really stuck on the lower corner then the context is twice as large as your screen Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
metaldc4life Posted September 14, 2014 Author Share Posted September 14, 2014 so I like divide 2 by my screen size or something like that? I appreciate all your help! Quote Link to comment Share on other sites More sharing options...
metaldc4life Posted September 14, 2014 Author Share Posted September 14, 2014 well i'm actually using visual studio to do all of this so.. i'll try in leadwerks though. Quote Link to comment Share on other sites More sharing options...
metaldc4life Posted September 14, 2014 Author Share Posted September 14, 2014 You rock! thank you for all your help!!!! I just need to do some tweaking and i'll get started on the rest... Thank You Again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.