DxGUI/onClientDXClick

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This event is triggered when you click a dx element.

Parameters

string button, string state, int absoluteX, int absoluteY
  • button: the name of the dx element which will be clicked , it can be left, right, middle
  • state: the state of the mouse button, will be down if the mouse button was pushed, or up if it was released.
  • absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen.
  • absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen.

Source

The source of this event is the DX element that was clicked.

Example

Example 1: This example outputs when you click a dx elements.

addEvent( "onClientDXClick", true )
addEventHandler( "onClientDXClick", root, function()
   outputChatBox("You clicked a dx element")
end
)