OnClientMouseEnter: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
This example shows a message when you move over a GUI element. | This example shows a message when you move over a GUI element. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler("onClientMouseEnter", getRootElement(), function(aX, aY) | addEventHandler( "onClientMouseEnter", getRootElement(), | ||
function(aX, aY) | |||
end) | outputChatBox( "You're pointing at a GUI element at ("..tostring(aX)..", "..tostring(aY)..")") | ||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 13:48, 10 May 2009
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
- onClientGUIAccepted
- onClientGUIBlur
- onClientGUIChanged
- onClientGUIClick
- onClientGUIComboBoxAccepted
- onClientGUIDoubleClick
- onClientGUIFocus
- onClientGUIMouseDown
- onClientGUIMouseUp
- onClientGUIMove
- onClientGUIScroll
- onClientGUISize
- onClientGUITabSwitched
- onClientMouseEnter
- onClientMouseLeave
- onClientMouseMove
- onClientMouseWheel
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled