CVS head - how do I get window-rel mouse pos?
Posted: Fri May 05, 2006 06:06
I've been fighting this for an hour, and it's getting me... irritated. All I want is relative coordinates, relative to the window - that is, 0.0 at left side, 1.0 at right side. Totally, 100% standard thing for a GUI, no?
It seems that you've totally removed window metrics, any Window methods that can convert between relative and absolute, AND made the mouse position ALWAYS return absolute? How is that sane?
I can't even get absolute width/height data on the window to convert the mouse pos into relative? The CoordConverter craps out (ie. returns NAN on precisely one out of the four values I need consistently - the lower right X coord if it matters) trying to convert window coords to screen when I set 1.0, 1.0 as the scale in the UVector (which is me trying to find the lower righthand corner in screen/absolute coords). Brilliant!
Surely I'm missing something?
It seems that you've totally removed window metrics, any Window methods that can convert between relative and absolute, AND made the mouse position ALWAYS return absolute? How is that sane?
I can't even get absolute width/height data on the window to convert the mouse pos into relative? The CoordConverter craps out (ie. returns NAN on precisely one out of the four values I need consistently - the lower right X coord if it matters) trying to convert window coords to screen when I set 1.0, 1.0 as the scale in the UVector (which is me trying to find the lower righthand corner in screen/absolute coords). Brilliant!
Surely I'm missing something?