OnDgsWindowClose

From Multi Theft Auto: Wiki

This event is fired when a dgs-dxwindow is being closed.

Notice: You can cancel this event and set animation.

Parameters

None

Source

The source of this event is the dgs-dxwindow that is being closed.

Example

This example shows how to make a simple closing animation.

DGS = exports.dgs

window = DGS:dgsCreateWindow(200,200,300,300,"test",false)

function windowClosed()
	cancelEvent()
	DGS:dgsAlphaTo(window,0,false,"OutQuad",1000)
	setTimer(function()
		destroyElement(window)
	end,1100,1)
end
addEventHandler("onDgsWindowClose",window,windowClosed)

See Also

DGS events

Plugin

Media

Color Picker

QRCode

Remote Image

Client event functions