Hi all,
According to the manual :
Quoteon_mouse_click (MouseButton button)
Called when the player clicks a mouse button. BUTTON is either LEFT, RIGHT or MIDDLE, depending on which button was clicked. The "mouse.x" and "mouse.y" global variables contain the mouse's position.
It doesn't say anything specific about GUIs.
Yet, when I click on a GUI (it's "on" and "clickable"), then on_mouse_click is not called. When i click outside, it's called.
I don't understand why. As a workaround I call "IsButtonDown" in repeatedly_execute_always.
I agree, on_mouse_click should be called *every* time the mouse is clicked. It doesn't make any sense to stop it doing so over a GUI.
I understand the reasoning, because in an adventure game, there aren't too much situations where you're dragging GUIs or stuff like that. 99,9% of the time, you're clicking on a GUI control or the room.
It might also have to do with the fact that AGS used to handle all GUI clicks in the interface_click function, and on_mouse_click was supposed to handle all other clicks.
There's also on_event / eEventGUIMouseDown/Up.
O, thanks for the answers!