The position of the mouse pointer on the screen is a Vec2. The function Ms.pos() returns the current position. The following code example shows the current mouse position on the screen.
Vec2 mousePos;
void InitPre()
{
5 EE_INIT();
}
bool Init()
{
10 return true;
}
void Shut() {}
15bool Update()
{
if(Kb.bp(KB_ESC)) return false;
mousePos = Ms.pos();
return true;
20}
void Draw()
{
D.clear(BLACK);
25 mousePos.draw(RED);
}