I have setup the following listener functions, but they do not seem to stop the code from running. I want them to pause until the mouse is pressed, with these functions being called at various points within the main code setup.
void MouseListen()
{
if (mousePressed=false)
{
noLoop();
}
else
{
mousePressed();
}
}
void KeyListen()
{
if (keyPressed=false)
{
noLoop();
}
else
{
keyPressed();
}
}