Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: joelphilippage on Wed 04/10/2006 01:07:50

Title: Deleting Cursors
Post by: joelphilippage on Wed 04/10/2006 01:07:50
I dont know how to delete cursors. Is it possible to Delete them or are they permanent.
Title: Re: Deleting Cursors
Post by: Akumayo on Wed 04/10/2006 01:16:46
I'm fairly certain that they're permanent, along with characters and such.
Title: Re: Deleting Cursors
Post by: joelphilippage on Wed 04/10/2006 02:44:42
Thanks
Title: Re: Deleting Cursors
Post by: Buckethead on Wed 04/10/2006 15:41:47
You could always just not use them or make them transparent  :)
Title: Re: Deleting Cursors
Post by: Sadistyk on Fri 06/10/2006 04:17:40
What you could do is this:
In the part of the game that you don't want the user to use the mouse put this:
mouse.Visible = false;

And in the on_mouse_click part of the script put something like this

function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    UnPauseGame();
  }
  else if (button == eMouseLeft) {
    if (mouse.Visible == true) {
      ProcessClick(mouse.x, mouse.y, mouse.Mode);
    }
  }
  else if (button == eMouseRight) {
    if (mouse.Visible == true) {
      mouse.SelectNextMode();
    }
  }
}

This way, the click of the mouse it's only processed if the mouse is visible.