Right clicking

[lua]
icon.OnMousePressed = function()
[/lua]

That’s when left clicking on the object. Is there a right click function? e.g.

[lua]
icon.OnRightMousePressed = function()
[/lua]

[editline]01:14AM[/editline]

That didn’t work, any other suggestions? :l

secondaryfire or something.


(User was banned for this post ("Can't help? Don't reply." - mahalis))

Lol, pwned.

And yeah, i have always wondered. I cant remember if anything was on the wiki, but try there if you haven’t?

i will keep looking. i used it before.

OnMousePressed takes a mouse enum as the first argument, just check if it is equal to MOUSE_RIGHT.

[lua]icon.OnMousePressed = function(s, mc)
if mc == MOUSE_RIGHT then
– code here
end
end[/lua]

Wouldn’t the first argument be the icon if you do it like that?

Why yes it would.

wow funny jus cus u have no friends irl

Thanks MakeR.

No problem.