DgsSimulateClick

From Multi Theft Auto: Wiki

This function simulates a click without mouse clicking.

Syntax

string dgsSimulateClick( element dgsElement, string button )

Required Arguments

  • dgsElement: The dgs element you want to triggered
  • button: Mouse button triggered, available values as follows:
    • left
    • middle
    • right

Returns

Returns true if succeed, false otherwise

Example

DGS = exports.dgs
local button = DGS:dgsCreateButton(0.2,0.2,0.2,0.1,"test",true)

addEventHandler("onDgsMouseClick",button,function(button,state)
	if button == "left" and state == "down" then
		outputChatBox("clicked")
	end
end)
DGS:dgsSimulateClick(button,"left")

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D