OnDgsRemoteImageLoad

From Multi Theft Auto: Wiki
Revision as of 11:54, 10 May 2020 by Temois (talk | contribs) (Created page with "{{Client event}} __NOTOC__ This event is called when the DGS QRCode is loaded. ==Parameters== <syntaxhighlight lang="lua"> element QRCode </syntaxhighlight> ==Example== <sy...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This event is called when the DGS QRCode is loaded.

Parameters

element QRCode

Example

DGS = exports.dgs --get exported functions from dgs

local QRCode = DGS:dgsRequestQRCode("https://wiki.multitheftauto.com/wiki/Resource:Dgs")
local image = DGS:dgsCreateImage(200,200,128,128,QRCode,false)
outputChatBox(DGS:dgsGetQRCodeLoaded(QRCode) and "Loaded" or "Loading")
addEventHandler("onDgsQRCodeLoad",QRCode,function()
	outputChatBox(DGS:dgsGetQRCodeLoaded(source) and "Loaded" or "Loading")
end,false)

See Also

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image

This event is called when the DGS Remote Image is loaded.

Parameters

element remoteImage

Example

DGS = exports.dgs --get exported functions from dgs

local imageTexture = DGS:dgsCreateRemoteImage("https://wiki.multitheftauto.com/images/thumb/2/2b/DGS_Logo.png/800px-DGS_Logo.png") --Source Texture
local image = DGS:dgsCreateImage(0, 0, 400, 200, imageTexture, false) 
DGS:dgsCenterElement(image) -- center image
outputChatBox(DGS:dgsGetRemoteImageLoadState(imageTexture ) and "Loaded" or "Loading")
addEventHandler("onDgsRemoteImageLoad",imageTexture ,function()
	outputChatBox(DGS:dgsGetRemoteImageLoadState(source) and "Loaded" or "Loading")
end,false)

See Also

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image