If i press and hold my right mouse button an actionmenu pop-ups where i can choose different interactions. However Ãf i right click over a GUI it don't pop up. I need this for my Inventory GUI. Does anyone know how to recognize the right click over a GUI to pop up a new GUI?
first, you have to create your own inventory GUI. Then, you must check "Handle Inventory clicks in script", in general settings. Then, in the on_mouse_click function you put:
if (button == RIGHTINV) {
//do something
}
if (button == LEFTINV) {
//do something
}
I'm getting a bit offtopic now, but I think you should know that this:
if (button==WHEELNORTH) {
//dosomething
}
if (button==WHEELSOUTH) {
//dosomething
}
triggers the mouse wheel (you have to check "Enable mouse wheel support" in the general settings). Just in case you didn't know that, I said this because it's kinda relevant to your question
You will need to do this with the repeadetly_execute function...
Put into the repeadetly_execute:
if (IsButtonDown(RIGHT)) {
//the actionmenu pupup code
} else {
//the actionmenu off code, something like GUIOff(...);
}
thank you both for your suggestions but i already solved my problem with the "on_event" function and it works fine :)