Getting the mouse cursor position no matter what
by Chris · in Torque 3D Professional · 05/28/2010 (11:11 pm) · 2 replies
I'm trying to find the current cursor position no matter what focus, hitting or visibility the control has.
Could someone show me the correct method, this is what I am doing now and it will work with my window border size and in windowed mode only. I'm sure there is a stupid simple way to make this happen and I'm just not finding it.
Thanks, Chris
Could someone show me the correct method, this is what I am doing now and it will work with my window border size and in windowed mode only. I'm sure there is a stupid simple way to make this happen and I'm just not finding it.
Thanks, Chris
GuiCanvas *pRoot = getRoot(); PlatformWindow* pWindow = pRoot->getPlatformWindow(); Point2I CursorPos; Point2I WindowPos; pWindow->getCursorPosition(CursorPos); WindowPos = pWindow->getPosition(); CursorPos -= WindowPos; CursorPos -= Point2I(6, 28);
About the author
#2
05/28/2010 (11:17 pm)
Well the GUI controls do have this, but it only returns guievents when the control is hit (mouse is over it or something of that nature)
Torque Owner JesseL
Pyrotronics-Games