Using the Pointer Cursor for in game menus

Started by MugMan, Fri 30/12/2016 01:59:16

Previous topic - Next topic

MugMan

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

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


Slasher

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

function game_start() 
{  
mouse.DisableMode(eModeLookat);
// etc etc
}





.

MugMan

Thank you Slasher! Works like a dream, cheers!

Khris

Just FYI, the command you used changed the image but not the mode. Use this to change the mode:

Code: ags
  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.

SMF spam blocked by CleanTalk