Hi,
I'm using the default VerbCoin.
I want to disable the verbcoin GUI on the title screen.
There's 3 hotspots - start game, load game, quit game.
I've tried something like this:
function room_Load()
{
gBottomBar.Visible = false;
mouse.Mode = eModePointer;
VerbCoin.Disable();
}
function hStart_AnyClick()
{
player.ChangeRoom(1);
}
function hLoad_AnyClick()
{
lstRestoreGamesList.FillSaveGameList();
gRestoreGame.Visible = true;
}
function hQuit_AnyClick()
{
QuitGame(0);
}
But it doesn't work.
I mean - when I use VerbCoin.Disable(); - the cursor remains in pointer mode, but clicking on hotspots don't do anything.
How to disable the VerbCoin and make AnyClick events work?
I found the solution, thanks to a similar topic (https://www.adventuregamestudio.co.uk/forums/index.php?topic=56495.0) on this forum (and modified it a bit).
Maybe it'll help someone too.
function room_Load()
{
gBottomBar.Visible = false;
mouse.Mode = eModePointer;
}
function on_mouse_click(MouseButton button) // called when a mouse button is clicked
{
if (button == eMouseLeft)
{
if (mouse.Mode == eModePointer)
{
// if there's a hotspot under mouse cursor
if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot)
{
// then fire "anyclick" event
Room.ProcessClick(mouse.x, mouse.y, eModePointer);
return; // do not do anything else
}
}
// in all other cases - just do default action
Room.ProcessClick(mouse.x,mouse.y, mouse.Mode);
}
}