DgsImageSetImage

From Multi Theft Auto: Wiki
Revision as of 14:56, 4 October 2017 by Thisdp (talk | contribs) (Created page with "{{Client function}} __NOTOC__ This function allows you to change the image in DGS image element to another one. ==Syntax== <syntaxhighlight lang="lua"> bool dgsDxImageLoadIm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function allows you to change the image in DGS image element to another one.

Syntax

bool dgsDxImageLoadImage ( element theElement, element texture )

Required Arguments

  • theElement: The image element to be changed.
  • texture: A texture/shader/render target/screen source element that you want to set.

Returns

Returns true if the the image in the image element was successfully changed, false otherwise.

Example

Click to collapse [-]
Client-side script (example.lua)
[lua]
local myImage = guiCreateStaticImage ( 0.45, 0.48, 0.2, 0.5, "myimage.png", true )
setTimer ( guiStaticImageLoadImage, 10000, 1, myImage, "otherimage.png" )
Click to collapse [-]
meta.xml

In this example meta.xml is used to tell the server which files it will be using.

<meta>
<info author="Yourname" version="1.0" />
<script src="example.lua" type="client" />
<file src="myimage.png" />
<file src="otherimage.png" />
</meta>

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