OnClientMouseEnter: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: {{Client event}} __NOTOC__ This event is fired when the user moves the mouse over a GUI element. ==Parameters== <syntaxhighlight lang="lua"> int absoluteX, int absoluteY </syntaxhighlight> * '''absoluteX''': t...)
(No difference)

Revision as of 16:26, 13 January 2008

This event is fired when the user moves the mouse over a GUI element.

Parameters

int absoluteX, int absoluteY
  • 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 GUI element that was pointed at.

Example

This example shows a message when you move over a GUI element.

addEventHandler('onClientMouseEnter', getRootElement(), function(aX, aY)
    outputChatBox("You're pointing at a GUI element at (" .. tostring(aX) .. ', ' .. tostring(aY) .. ')')
end)

See Also

GUI events

Input

GUI


Client event functions

Shared