OnDgsWindowClose: Difference between revisions
Jump to navigation
Jump to search
m (Cancel event) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 10: | Line 10: | ||
==Source== | ==Source== | ||
The [[event system#Event source|source]] of this event is the dgs-dxwindow that is being closed. | The [[event system#Event source|source]] of this event is the dgs-dxwindow that is being closed. | ||
==Cancel event== | |||
When you cancel this event, the window is not destroyed. | |||
==Example== | ==Example== | ||
Line 16: | Line 19: | ||
DGS = exports.dgs | DGS = exports.dgs | ||
window = DGS: | window = DGS:dgsCreateWindow(200,200,300,300,"test",false) | ||
function windowClosed() | function windowClosed() | ||
Line 25: | Line 28: | ||
end,1100,1) | end,1100,1) | ||
end | end | ||
addEventHandler(" | addEventHandler("onDgsWindowClose",window,windowClosed) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 18:48, 13 April 2021
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.
Cancel event
When you cancel this event, the window is not destroyed.
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
General
- onDgsBlur
- onDgsCreate
- onDgsCursorTypeChange
- onDgsCursorStateChange
- onDgsDestroy
- onDgsElementRender
- onDgsElementMove
- onDgsElementSize
- onDgsElementEnter
- onDgsElementLeave
- onDgsFocus
- onDgsKey
- onDgsPositionChange
- onDgsPreRender
- onDgsRender
- onDgsElementScroll
- onDgsSizeChange
- onDgsTextChange
- onDgsWindowClose
- onDgsPropertyChange
Check Box
Combo Box
Drag'N Drop
Edit
Grid List
Menu
Selector
Mouse
- onDgsMousePreClick
- onDgsMouseClick
- onDgsMouseClickDown
- onDgsMouseClickUp
- onDgsMouseDrag
- onDgsMouseDoubleClick
- onDgsMouseDoubleClickDown
- onDgsMouseDoubleClickUp
- onDgsMouseDown
- onDgsMouseHover
- onDgsMouseEnter
- onDgsMouseLeave
- onDgsMouseMultiClick
- onDgsMouseMove
- onDgsMouseStay
- onDgsMouseUp
- onDgsMouseWheel
Radio Button
Switch Button
Tab
Animation
Plugin
Media
- onDgsMediaPlay
- onDgsMediaPause
- onDgsMediaStop
- onDgsMediaLoaded
- onDgsMediaTimeUpdate
- onDgsMediaBrowserReturn
Color Picker
QRCode
Remote Image
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled