Quote from: Ghost on Thu 01/03/2012 01:51:23
Isn't it possible to check in on_mouse_click if the mous is over a GUI?
If NO button must respond to RMB, you could just disable it whenever ANY button is clicked.
function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
{
if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
{
}
else if (button == eMouseLeft)
{
ProcessClick(mouse.x,mouse.y, eModeInteract);
}
else if (button == eMouseRight) // right-click
{
// This should do nothing, but it still works on GUI buttons
} else {
// More nothing
}
}