DxGUI/onClientDXClick: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "This event is triggered when you click a dx element. ==Parameters== <syntaxhighlight lang="lua"> string button, string state, int absoluteX, int absoluteY </syntaxhighlight> *'''button:''' the name o...")
 
(No difference)

Latest revision as of 03:52, 22 December 2014

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
)