OnDgsMenuSelect
Jump to navigation
Jump to search
This event is fired when the item of a DGS menu is clicked.
Parameters
dgs-dxmenu subMenu, integer itemUniqueIndex
- subMenu: The sub dgs-dxmenu that the item in.
- previous: The item id that last selected.
Source
The source of this event is the root dgs menu element.
Example
DGS = exports.dgs local menu = DGS:dgsCreateMenu(200,200,200,600,false) local item = DGS:dgsMenuAddItem(menu,"test1","test1") local item2 = DGS:dgsMenuAddItem(menu,"test2","test2",item) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddSeparator(menu) local item = DGS:dgsMenuAddItem(menu,"test3","test3") local item2 = DGS:dgsMenuAddItem(menu,"test2","test2",item) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) DGS:dgsMenuAddItem(menu,"test2","test2",item2) local button = DGS:dgsCreateButton(200,200,300,300,"what",false) addEventHandler("onDgsMouseClickUp",button,function(button) if button == "right" then DGS:dgsMenuShow(menu) end end) addEventHandler("onDgsMenuSelect",menu,function(subMenu,uniqueID) iprint("select",subMenu,uniqueID) end)
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