Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: mouse position when not active window  (Read 156 times)

Coks

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
    • View Profile
mouse position when not active window
« on: February 04, 2012, 11:15:58 PM »

Hello!

I get the event mousePressed. MouseState have position of the mouse but it is only updated when an event occurs mouseMoved. When the window is not active I pressed a mouse on it and I get the wrong position of the mouse (old position). I use non exclusive mode.
Do I understand?

p.s. Sorry for my bad English.
Logged

Coks

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
    • View Profile
Re: mouse position when not active window
« Reply #1 on: February 06, 2012, 03:19:14 AM »

Is it possible to retrieve the mouse position at anytime? Then the problem will be solved.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Re: mouse position when not active window
« Reply #2 on: February 09, 2012, 08:08:18 PM »

In multiwindow apps, only a focused window will get mouse updates. If you are running multiple windows, you cannot create an OIS instance for each.
Logged