ID:133613
 
1. Its semi-nice that we can change the right mouse click, but we can only change it to run on the left mouse click! how bout setting up like a RgtClick() proc so we can edit it to whatever we want, in both the cases ive wanted to use the right mouse for something the left button was already being used for something else.

2. Middle mouse button/mouse wheel, another nice function/feature/proc would be something for the middle wheel clicking and/or scrolling. just some suggestions <.< THANKS FOR YOUR TIME! GOOD DAY SIR!

EDIT: another possibility would just be to add an arguement passed through all the click procedures that determines which of these 3 buttons were used <.O
The params for Click() already tell you what conditions the mouse was clicked under. From the reference:

"The params argument is text, and can be converted to a list using params2list(). It may contain any of the following properties, which will only be set if they are used:

icon-x, icon-y: Pixel coordinates within the icon; 1,1 is the lower left
left, middle, right: Mouse buttons pressed/held/released
ctrl, shift, alt: Keys held down during the mouse action
drag-cell, drop-cell: Cells involved if using a Grid control."

I am told that right clicks may/may not work if you have the client's show_popup_menus var still set to 1 (which is intended, I take it, from the documentation).
In response to Devourer Of Souls (#1)
ah i see, vereh nice thanks!
One thing I don't like is the inability to have both the ability to override right-clicking and the popup menu for right-clicking.

I'd like to see a datum.show_popup_menu variable or something akin to that, which allows you to define right-clicking only for special objects.

-- Data
In response to Android Data (#3)
Android Data wrote:
I'd like to see a <s>datum</s> atom.show_popup_menu variable or something akin to that, which allows you to define right-clicking only for special objects.

You can already do this, per verb. Look up the 'popup_menu' setting.
In response to Kaioken (#4)
Kaioken wrote:
You can already do this, per verb. Look up the 'popup_menu' setting.

I just tried this, but no go. set popup_menu=0 for all verbs belonging to a particular object does not allow you to override the click procedures.

What I meant is a variable that will work like client.show_popup_menus but which works on a per-object basis.

-- Data
In response to Android Data (#5)
Android Data wrote:
I just tried this, but no go. set popup_menu=0 for all verbs belonging to a particular object does not allow you to override the click procedures.

That'd be a bug then, they probably forgot to update it.

What I meant is a variable that will work like client.show_popup_menus but which works on a per-object basis.

Those things don't shouldn't go on objects. Objects are objects and verbs are verbs, they're quire independent too (of course it would be nice for saving code to have some kind of syntax to override multiple verb settings at once inheritance-style but this isn't specifically for this and was suggested before as well) so I don't see any reason to stick extra variables on atoms that relate to actual verb functionality, especially considering you've already got that verb setting implemented.
In response to Kaioken (#6)
Kaioken wrote:
Those things don't shouldn't go on objects. Objects are objects and verbs are verbs,

Okay then.

obj/myobject
verb
A()
set popup_menu = 1
usr << "You clicked A!"
B()
set popup_menu = 0
usr << "You clicked B!"

//client/show_popup_menus = 0 //this is optional


So, following your logic, what happens if I right-click the object?

Since the popup_menu = 0 in the B() verb, it stands to reason that it would call Click(location, control, params = "right=1;icon-x=[x];icon-y=[y]"). But because the A() verb has it set to 1, it must make a popup menu allowing you to use the A verb.

Now for my version:

obj/myobject
_show_popup_menu = 0
Click(location, control, list/params)
params = params2list(params)
if(params["right"]) usr << "You right-clicked me!"
obj/object2
verb
A()
usr << "You clicked A!"
B()
usr << "You clicked B!"

client/show_popup_menus = 1 //this is required for this example


Now what I'm saying is that right-clicking /obj/myobject will cause the right-click to be forwarded to it's click proc, but right-clicking anything else will make a popup menu (if available).

If both /obj/myobject and /obj/object2 are on top of eachother, it just depends what you right-clicked.

-- Data
In response to Android Data (#7)
Android Data wrote:
So, following your logic, what happens if I right-click the object?

Simple enough.
If both verbs are currently accessible, then it will not allow overriding (won't call Click()) and display the popup menu instead, because one of them has popup_menu=1.
Otherwise, if all currently accessible verbs have popup_menu == 0, then it will execute the Click() proc.