Syntax
xBool MLeftDown( void );
Arguments
No arguments.
Return value
T if the left mouse button is down, otherwise F.
Description
Poll the current state of the left mouse button. This is useful while dragging a control, such as a scroll bar thumb. Use mouse-event codes from `Inkey()` when the input loop needs to distinguish the press and release events.
Example
#include "xdev-wtui.h"
#include <stdio.h>
int main( void )
{
if( !MPresent() )
{
puts( "Mouse unavailable." );
return 0;
}
DispOut( "Hold down the left mouse button.", NULL );
Inkey( 3, NIL );
printf( "Left button down: %s\n", MLeftDown() ? "yes" : "no" );
return 0;
}