DgsGetRemoteImageLoadState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} This function gets whether the DGS Remote Image is loaded or not. ==Syntax== <syntaxhighlight lang="lua"> bool dgsGetRemoteImageLoadState( elem...")
 
No edit summary
 
Line 18: Line 18:


local imageTexture = DGS:dgsCreateRemoteImage("https://wiki.multitheftauto.com/images/thumb/2/2b/DGS_Logo.png/800px-DGS_Logo.png") --Source Texture
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, texture, false)  
local image = DGS:dgsCreateImage(0, 0, 400, 200, imageTexture, false)  
DGS:dgsCenterElement(image) -- center image
DGS:dgsCenterElement(image) -- center image
outputChatBox(DGS:dgsGetRemoteImageLoadState(imageTexture ) and "Loaded" or "Loading")
outputChatBox(DGS:dgsGetRemoteImageLoadState(imageTexture ) and "Loaded" or "Loading")

Latest revision as of 11:50, 10 May 2020

This function gets whether the DGS Remote Image is loaded or not.

Syntax

bool dgsGetRemoteImageLoadState( element imageTexture )

Required Arguments

  • imageTexture : A dgs-dxremoteimage element.

Returns

Returns true if the remote image is loaded, false otherwise.

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

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

Menu

Label

Layout

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Basic Shape Plugins

Circle

Quadrilateral

Rounded Rectangle

Other Plugins

Blur Box

Canvas

Chart

Color Picker

Effect 3D

Gradient

Mask

Media Browser

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Screen Source

SVG

Tooltips