CustomStaticImage.create

From Multi Theft Auto: Wiki
Revision as of 13:49, 20 November 2020 by Ridden (talk | contribs) (Created page with "__NOTOC__ {{Client function}} This function creates an static image . ==Syntax== <syntaxhighlight lang="lua"> cimage CustomStaticImage.create(float X, float Y, float Width,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function creates an static image .

Syntax

cimage CustomStaticImage.create(float X, float Y, float Width, float Height, string Location, [bool Relative, CW-element Parent])

Required Arguments

  • X: A float of the 2D x position of the image on a player's screen.
  • Y: A float of the 2D y position of the image on a player's screen.
  • Width: A float of the width of the image.
  • Height: A float of the height of the image.
  • Location: A string of texture path.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • Relative: A boolean of whether sizes and positioning are relative.
  • parent: This is the parent that the image is attached to.

Returns

Returns element if image was created successfully, false otherwise.

Example

This example will display a rectangle on the player's screen.

Click to collapse [-]
Client-side

CustomStaticImage.create(100,100,200,200,"image.png")

Right:Digital/Ridden

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