DgsImageSetImage

From Multi Theft Auto: Wiki
(Redirected from DgsDxImageSetImage)
Jump to navigation Jump to search

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 image in the image element was successfully changed, false otherwise.

Example

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

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