OnDgsMouseDoubleClick
From Multi Theft Auto: Wiki
This event occurs when double clicking on any dgs-element.
Parameters
string button, int absoluteX, int absoluteY
- button: the name of the button which will be clicked , it can be left, right, middle
- state: the state of the mouse button. Can be down or up.
- absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen.
- absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen.
Source
The source of this event is the DGS element that was double clicked.
Example
This example creates a text button and clicking on it will tell you the position coordinates of the mouse cursor:
DGS = exports.dgs button = DGS:dgsCreateButton(0.3, 0.3, 0.1, 0.05, "Button", true) addEventHandler( "onDgsMouseDoubleClick", button, function(button, state, x, y) if button == 'left' and state == 'up' then outputChatBox("This is a test button clicked on X: " .. x .. " Y: " .. y) end end )
See Also
DGS events
- onDgsArrowListValueChange
- onDgsBlur
- onDgsCheckBoxChange
- onDgsComboBoxStateChange
- onDgsComboBoxSelect
- onDgsCreate
- onDgsDestroy
- onDgsEditPreSwitch
- onDgsEditSwitched
- onDgsEditAccepted
- onDgsElementRender
- onDgsElementMove
- onDgsElementSize
- onDgsFocus
- onDgsGridListItemDoubleClick
- onDgsGridListSelect
- onDgsMouseClick
- onDgsMouseClickDown
- onDgsMouseClickUp
- onDgsMouseDrag
- onDgsMouseDoubleClick
- onDgsMouseDown
- onDgsMouseEnter
- onDgsMouseLeave
- onDgsMouseMove
- onDgsMouseUp
- onDgsMouseWheel
- onDgsRadioButtonChange
- onDgsPositionChange
- onDgsPreRender
- onDgsRender
- onDgsElementScroll
- onDgsSizeChange
- onDgsTabPanelTabSelect
- onDgsTabSelect
- onDgsTextChange
- onDgsWindowClose
Plugin
Media
- onDgsMediaPlay
- onDgsMediaPause
- onDgsMediaStop
- onDgsMediaDurationGet
- onDgsMediaTimeUpdate
- onDgsMediaBrowserReturn
Color Picker
Client event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- triggerLatentServerEvent
- triggerServerEvent
- wasEventCancelled