Code:
Problem description:
I'm trying to figure out how to detect a right click from the mouse. I gather from reading the skin reference that there's a parameter I can access that's related to the Click() proc, but I can't seem to find an example, and I haven't been able to find one on the forums.
For now, all I want to do is right click on an object and display output to the player that says, "You clicked on [whatever]."
Thanks LordAndrew. No wonder I couldn't figure it out. Do you know... is this covered somewhere in more detail (like under a Help topic maybe)?
|
p["right"] is also a true value during right-clicks. It's probably slightly more efficient than the "in" operator.
I think the original way to activate right-clicking on maps is to set client.show_popup_menus=0. There's an entire reference entry for "mouse control". |
The mouse control entry explains a great deal of it.
|
Okay. Thanks much. In reading that, I can see that my first error was not enabling right-mouse clicks as procs on the particular control I was working on. My second error was that my "Click()" proc was defined under client, which takes an extra parameter ("object"), so my params2list() was converting the wrong thing.
Now I think I get it. Thanks again to you both. |
Then, you can do this: