setCursorPos(pos); } "> GuiCanvas.setCursorPos | Torque Game Engine Advanced | Forums | Community | GarageGames.com

Game Development Community

GuiCanvas.setCursorPos

by Entr0py · in Torque Game Engine Advanced · 01/25/2007 (9:50 pm) · 1 replies

ConsoleMethod( GuiCanvas, setCursorPos, void, 3, 4, "(Point2I pos)")
{
   Point2I pos(0,0);
   if(argc == 4)
      pos.set(dAtoi(argv[2]), dAtoi(argv[3]));
   else
      dSscanf(argv[[b]3[/b]], "%d %d", &pos.x, &pos.y);
   Canvas->setCursorPos(pos);
}

The Fix:
dSscanf(argv[[b]2[/b]], "%d %d", &pos.x, &pos.y);

#1
01/25/2007 (10:59 pm)
Oh yeah and don't forget this thread to control the actual OS cursor position. This fix works in TGEA.