OnDgsMouseStay: 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 cursor first stays at a DGS element without moving. ==Parameters== <syntaxhighlight lang="lua"> int absoluteX, int absoluteY, element leftGUI </syntaxhighlight> * '''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 event system#Event sour...")
 
No edit summary
 
Line 1: Line 1:
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__  
This event is fired when the cursor first stays at a DGS element without moving.
This event is fired when the cursor first stays at a DGS element without moving for a period.


==Parameters==  
==Parameters==  

Latest revision as of 11:01, 24 December 2022

This event is fired when the cursor first stays at a DGS element without moving for a period.

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.

Source

The source of this event is the DGS element that the cursor stays at.

Example

This example shows a message when the cursor first stays at a DGS element.

DGS = exports.dgs
label = DGS:dgsCreateLabel(200,200,300,50,"Test DGS Element",false)

addEventHandler( "onDgsMouseStay", label, function(aX, aY)
	outputChatBox( "Your cursor stays 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