OnDgsRemoteImageLoad: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{Client event}}
__NOTOC__
This event is called when the DGS Remote Image is loaded.
==Parameters==
<syntaxhighlight lang="lua">
element remoteImage
</syntaxhighlight>
==Example==
<syntaxhighlight lang="lua">
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)
</syntaxhighlight>
==See Also==
{{DGSEVENTS}}
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__  

Latest revision as of 09:14, 17 January 2021

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