DgsSetMouseStayDelay

From Multi Theft Auto: Wiki
Revision as of 11:27, 24 December 2022 by Thisdp (talk | contribs) (Created page with "{{Client function}} __NOTOC__ This function sets the delay time that from mouse stops moving and cursor stays at a DGS element to onDgsMouseStay event triggers. ==Syntax== <syntaxhighlight lang="lua"> bool dgsSetMouseStayDelay( int interval ) </syntaxhighlight> ===Required Arguments=== *'''delay:''' An int of the delay time. ===Returns=== Returns ''true'' if successful, ''false'' otherwise ==Example== <syntaxhighlight lang="lua"> DGS = exports.dgs DGS:dgsSetMou...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function sets the delay time that from mouse stops moving and cursor stays at a DGS element to onDgsMouseStay event triggers.

Syntax

bool dgsSetMouseStayDelay( int interval )

Required Arguments

  • delay: An int of the delay time.

Returns

Returns true if successful, false otherwise

Example

DGS = exports.dgs
DGS:dgsSetMouseStayDelay(5000) --Set to 5s

local label = DGS:dgsCreateLabel(200,200,100,50,"Test Label",false)
addEventHandler("onDgsMouseStay",label,function()
	outputChatBox("Stay triggered")
end)

See Also

General Functions

General Events