Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MugMan on Fri 30/12/2016 01:59:16

Title: Using the Pointer Cursor for in game menus
Post by: MugMan on Fri 30/12/2016 01:59:16
Hello! I've ran into a problem, after my title screen fades in i thought it'd be a good idea to change the players cursor to the pointer, however, the cursor can no longer be used for clicking on the hotspots i'd set up for the different buttons on the menu, how would i set the player's cursor to the pointer, not allow them to switch, and allow the pointer to interact with hotspots?
Code (ags) Select

function room_RepExec()
{
mouse.UseModeGraphic(eModePointer);
}

Title: Re: Using the Pointer Cursor for in game menus
Post by: Slasher on Fri 30/12/2016 03:54:55
One Way:

You could simply disable the other cursors in Game Start until you have clicked on the Hotspot then enable them.

eg
Code (ags) Select

function game_start()

mouse.DisableMode(eModeLookat);
// etc etc
}





.
Title: Re: Using the Pointer Cursor for in game menus
Post by: MugMan on Fri 30/12/2016 04:11:01
Thank you Slasher! Works like a dream, cheers!
Title: Re: Using the Pointer Cursor for in game menus
Post by: Khris on Fri 30/12/2016 13:35:18
Just FYI, the command you used changed the image but not the mode. Use this to change the mode:

  mouse.Mode = eModePointer;

To prevent the user from changing to another mode, the easiest way is to disable all other modes, as Slasher pointed out.
Another way would be to intercept changing the mode in on_mouse_click, based on Player.Room.