OnDgsPositionChange: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client event}} __NOTOC__ This event is triggered each time the position of a DGS element changed. ==Parameters== ''None'' ==Source== The event system#Event source|sourc...")
 
 
(2 intermediate revisions by the same user not shown)
Line 14: Line 14:
DGS = exports.dgs
DGS = exports.dgs


local window = DGS:dgsDxCreateWindow(200,200,600,400,"Test Window",false)
local window = DGS:dgsCreateWindow(200,200,600,400,"Test Window",false)


addEventHandler("onClientDgsDxGUIPositionChange",root,function()
addEventHandler("onDgsPositionChange",root,function()
outputChatBox("You have moved :"..DGS:dgsGetType(source))
outputChatBox("You have moved :"..DGS:dgsGetType(source))
end)
end)

Latest revision as of 13:42, 20 January 2018

This event is triggered each time the position of a DGS element changed.

Parameters

None

Source

The source of this event is the DGS element whose position has changed.

Example

This example would output to the chatbox what the player moved.

DGS = exports.dgs

local window = DGS:dgsCreateWindow(200,200,600,400,"Test Window",false)

addEventHandler("onDgsPositionChange",root,function()
	outputChatBox("You have moved :"..DGS:dgsGetType(source))
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