DgsGetElementsFromResource

From Multi Theft Auto: Wiki
(Redirected from DgsGetDxGUIFromResource)
Jump to navigation Jump to search

This function is used to get DGS elements which were created by other resources.

Syntax

table dgsGetElementsFromResource( [ resource res ] )

Required Arguments

None

Optional Arguments

  • res: The resource which DGS elements were created by.

Returns

Returns a table containing DGS elements which were created by the resource, false otherwise.

Example

DGS = exports.dgs
for i=1,10 do
	DGS:dgsCreateLabel ( math.random(0,1),math.random(0,1),0.2,0.1, "Hello world"..i, true ) --Create Labels without storing into variables.
end

for k,v in ipairs(DGS:dgsGetElementsFromResource()) do --Get All DGS Dx GUIs that created by this resource.
	if DGS:dgsGetType(v) == "dgs-dxlabel" then
		local text = DGS:dgsGetText(v)  --Get Label Text.
		outputChatBox(text) --Out put Label Text.
	end
end

See Also

Custom Cursor Functions

Multi Language Supports

Animation

3D Element

3D Interface

3D Line

3D Image

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Drag'N Drop

Grid List

Image

Memo

Label

Layout

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Plugin

Blur Box

Canvas

Chart

Circle

Color Picker

Effect 3D

Gradient

Mask

Media Browser

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Rounded Rectangle

Screen Source

SVG