Jump to content

almost got my program up and running just need one more thing..


metaldc4life
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...