I am using raylib 3.5.0 and here is my code:
Vector2 startMousePos = GetMousePosition();
Vector2 endMousePos;
bool mousePressed = false;
while (1)
{
if (!IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
{
break;
}
mousePressed = true;
endMousePos = GetMousePosition();
}
I want to create a line based on the position the mouse starts clicking and where it ends but this code causes a infinit loop.