M MY Multiplayer: Wiki
Side
Kind

onClientDoubleClick

ClientEvent

Fired when a mouse button is pressed twice in a row while the cursor is showing.

addEventHandler("onClientDoubleClick", root, function(string button, float absoluteX, float absoluteY, float worldX, worldY, worldZ, element|false clickedElement) … end)

Handler parameters

NameTypeDescription
buttonstring"left", "middle" or "right".
absoluteXfloatThe cursor's horizontal position in pixels.
absoluteYfloatThe cursor's vertical position in pixels.
worldX, worldY, worldZfloatThe world point under the cursor where the line of sight hits something, or the point 300 units ahead when it hits nothing.
clickedElementelement|falseThe element hit, or false if there is no element there.

Source

The root element (root).

A second press within 330 ms of the previous one and within 10 pixels of it counts as a double click. onClientClick fires first, on both presses.

Example

addEventHandler("onClientDoubleClick", root, function(button, x, y, wx, wy, wz, clicked)
    if button == "left" and clicked and getElementType(clicked) == "vehicle" then
        outputDebugString("Double-clicked a vehicle")
    end
end)

See also