Disable any mouse function

Started by Totoro, Wed 03/12/2003 23:15:54

Previous topic - Next topic

Totoro

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?

Scorpiorus

#1
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

SMF spam blocked by CleanTalk