Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Totoro on Wed 03/12/2003 23:15:54

Title: Disable any mouse function
Post by: Totoro on Wed 03/12/2003 23:15:54
Hello,
ist there some way to disable any mouse function? I know how to make the mouse pointer invisible, but still when clicking, it will do some reaction at the place where its on the screen. Is there some quick way to include something like a "if any mouseclick - do nothing" code?
Title: Re:Disable any mouse function
Post by: Scorpiorus on Wed 03/12/2003 23:55:54
hello,

Yeah, take a look at the global script  mouse click handling function:

function on_mouse_click(int button) {
 // called when a mouse button is clicked. button is either LEFT or RIGHT
 if (IsGamePaused() == 1) {
   // Game is paused, so do nothing (ie. don't allow mouse click)
 }
 else if (button==LEFT) {
   ProcessClick(mouse.x, mouse.y, GetCursorMode() );
 }
 else {   // right-click, so cycle cursor
   SetNextCursorMode();
 }
}

~Cheers