Okay, this might be very dumb and the solution must be very simple. I just can't see it. :)
I want my GUI to be not clickable if I click on it with the right mouse button, but clickable if click on it with the left one. Yes, it sounds very simple, but it seems impossible for me to script, since it seems that wherever I put the gui[].Clickable = false; script, it still disables the GUI too late. This is because I need the GUI to be disabled after the mouse button is pressed. Is there a workaround for this?
Thanks!
GUI on_click functions, and GUI Button control functions, have the MouseButton parameter in them so in theory you could do something like:
function btnInvSelect_Click(GUIControl *control, MouseButton button) {
if (button == eMouseLeft) { // Only runs if left mouse button used
// They pressed SELECT, so switch to the Get cursor
mouse.Mode = eModeInteract;
// But, override the appearance to look like the arrow
mouse.UseModeGraphic(eModePointer);
}
}
However, I don't know how practical this would be over a large number of GUIs / Buttons, and of course it doesn't allow for other Control types. Depending on what exactly you're after, it might be some help, though.