OnDgsMouseEnter: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client event}} __NOTOC__ This event is fired when the user moves the mouse over a DGS element. ==Parameters== <syntaxhighlight lang="lua"> int absoluteX, int absoluteY, e...")
 
No edit summary
Line 16: Line 16:
This example shows a message when you move over a DGS element.
This example shows a message when you move over a DGS element.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
addEventHandler( "onClientDgsDxMouseEnter", root, function(aX, aY)
addEventHandler( "onDgsMouseEnter", root, function(aX, aY)
outputChatBox( "You're pointing at a DGS element at ("..tostring(aX)..", "..tostring(aY)..")")
outputChatBox( "You're pointing at a DGS element at ("..tostring(aX)..", "..tostring(aY)..")")
end)
end)

Revision as of 13:30, 20 January 2018

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

Parameters

int absoluteX, int absoluteY, element leftGUI
  • 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.
  • leftGUI: the dgs element that was switched from, or nil if it doesn't exist

Source

The source of this event is the DGS element that was pointed at.

Example

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

addEventHandler( "onDgsMouseEnter", root, function(aX, aY)
	outputChatBox( "You're pointing at a DGS element at ("..tostring(aX)..", "..tostring(aY)..")")
end)

See Also

DGS events

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image

Client event functions