Skip to content

TUTORIAL Mouse Input

invoker__qq edited this page Nov 15, 2020 · 2 revisions

Keyboard Input

int sum;
//mouse input
if(MousebReleased()) //or if(MousebHeld()) or if(MousebPressed())
{
    sum++;
    //do something
}
char t1[50];
sprintf(t1,"mouse pos is %d %d\nmouse released number is %d",mouse_pos_x,mouse_pos_y, sum);
DrawString(ScreenWidth()/2-200,ScreenHeight()/2 + 200,t1);

mouse_pos_x is x postion
mouse_pos_y is y postion

Clone this wiki locally