OnDgsWindowClose: 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 a dgs-dxwindow is being closed. Notice: You can cancel this event and set close animation. ==Parameters== None ==Source...")
 
Line 19: Line 19:
function windowClosed()
function windowClosed()
cancelEvent()
cancelEvent()
DGS:dgsDxAlphaTo(window,0,false,"OutQuad",1000)
DGS:dgsAlphaTo(window,0,false,"OutQuad",1000)
setTimer(function()
setTimer(function()
destroyElement(window)
destroyElement(window)
Line 26: Line 26:
addEventHandler("onClientDgsDxWindowClose",window,windowClosed)
addEventHandler("onClientDgsDxWindowClose",window,windowClosed)
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==

Revision as of 14:20, 25 August 2017

This event is fired when a dgs-dxwindow is being closed. Notice: You can cancel this event and set close animation.

Parameters

None

Source

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

Example

This example outputs a message with the selected item when an item is selected.

DGS = exports.dgs

window = DGS:dgsDxCreateWindow(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("onClientDgsDxWindowClose",window,windowClosed)

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