DgsImageSetImage

From Multi Theft Auto: Wiki

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

Note:

  • If you pass path into this function, path will be converted into texture element handled by dgs.
  • If you want to control the texture by yourself, please pass a texture element into this function.
  • If you don't want to use texture element, please use dgsSetProperty ( yourImage, "image" ,yourPath )

Syntax

bool dgsImageSetImage ( element theElement, element/string texture )

Required Arguments

  • theElement: The image element to be changed.
  • texture: A texture/shader/render target/screen source/image path 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
DGS = exports.dgs
local texture = dxCreateTexture("text.png")  -- You need to add a texture yourself.
local myImage = DGS:dgsCreateImage ( 0.45, 0.48, 0.2, 0.5, _, true )
setTimer ( DGS:dgsImageSetImage, 10000, 1, myImage, texture )

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D