I found the solution, thanks to a similar topic on this forum (and modified it a bit).
Maybe it'll help someone too.
Code: ags
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);
}
}