Dgs-dximage: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 18: Line 18:
*'''color''' : An integer of the color of the image.
*'''color''' : An integer of the color of the image.


===sideColor===
===rotationCenter===
The color which can be translated by [[tocolor]] of the image.(sideSize should be changed to enable border)
The rotation center of the image. ''Learn More [[dxDrawImage]]''.
<syntaxhighlight lang="lua">dgsSetProperty(image,"sideColor",color)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(image,"rotationCenter",{xOffset,yOffset,relative})</syntaxhighlight>
*'''color''' : An integer of the color of the '''border''' of the image.
*'''xOffset''' : The X offset from the image center for which to rotate the image from, which determined by '''relative'''.
*'''yOffset''' : The Y offset from the image center for which to rotate the image from, which determined by '''relative'''.
*'''relative''' : A bool indicates whether the offsets are relative to the size of dgs-dximgage.


===sideSize===
===rotation===
The size of the border of the image.(sideColor should be changed to enable border)
The rotation of the image. ''Learn More [[dxDrawImage]]''.
<syntaxhighlight lang="lua">dgsSetProperty(image,"sideSize",size)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(image,"rotation",rotation)</syntaxhighlight>
*'''size''' : A float of the size of the border of the image.
*'''rotation''' : The rotation, in degrees for the image.


===sideState===
===shadow===
The state of the border.(in/out/center)
The shadow image of the button.
<syntaxhighlight lang="lua">dgsSetProperty(image,"sideState",state)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(image,"shadow",{offsetX,offsetY,color})</syntaxhighlight>
*'''state''' : A string of the state of the border which can be
*'''offsetX''' : A float of the 2D X offset of the shadow image of the button.
**in
*'''offsetY''' : A float of the 2D Y offset of the shadow image of the button.
**out
*'''color''' : An integer of the color of the shadow image of the button.
**center
 
===UVSize===
The uv size of image section [[dgsImageSetUVSize]]/[[dgsImageGetUVSize]]. ''Learn More [[dxDrawImageSection]]''.
<syntaxhighlight lang="lua">dgsSetProperty(image,"UVSize",{USize,VSize,relative})</syntaxhighlight>
*'''USize''' : The width of the U size of image.
*'''VSize''' : The height of the V size of image.
*'''relative''' :This determines whether UV size is relative. If this is true, then UV size floats must be between 0 and 1, representing UV sizes relative to the pixels of the texture loaded.
 
===UVPos===
The uv position image section [[dgsImageSetUVPosition]]/[[dgsImageGetUVPosition]]. ''Learn More [[dxDrawImageSection]]''.
<syntaxhighlight lang="lua">dgsSetProperty(image,"UVPos",{UPos,VPos,relative})</syntaxhighlight>
*'''UPos''' : the X coordinate of the top left corner of the section which should be drawn from image.
*'''VPos''' : the Y coordinate of the top left corner of the section which should be drawn from image.
*'''relative''' :This determines whether UV position is relative. If this is true, then UV position floats must be between 0 and 1, representing UV positions relative to the pixels of the texture loaded.


==See Also==
==See Also==
{{DGSPROPERTIES}}
{{DGSPROPERTIES}}

Latest revision as of 10:03, 2 July 2021

DGS Properties is always used to change the gui style and make it more fantastic.

This page shows the properties of dgs-dximage that you could use.

Main Functions

Properties

image

This is equivalent to dgsImageSetImage/dgsImageGetImage.

dgsSetProperty(image,"image",texture)
  • texture : A material element (texture/shader/screen source/render target) of the image.

color

The color which can be translated by tocolor of the image.

dgsSetProperty(image,"color",color)
  • color : An integer of the color of the image.

rotationCenter

The rotation center of the image. Learn More dxDrawImage.

dgsSetProperty(image,"rotationCenter",{xOffset,yOffset,relative})
  • xOffset : The X offset from the image center for which to rotate the image from, which determined by relative.
  • yOffset : The Y offset from the image center for which to rotate the image from, which determined by relative.
  • relative : A bool indicates whether the offsets are relative to the size of dgs-dximgage.

rotation

The rotation of the image. Learn More dxDrawImage.

dgsSetProperty(image,"rotation",rotation)
  • rotation : The rotation, in degrees for the image.

shadow

The shadow image of the button.

dgsSetProperty(image,"shadow",{offsetX,offsetY,color})
  • offsetX : A float of the 2D X offset of the shadow image of the button.
  • offsetY : A float of the 2D Y offset of the shadow image of the button.
  • color : An integer of the color of the shadow image of the button.

UVSize

The uv size of image section dgsImageSetUVSize/dgsImageGetUVSize. Learn More dxDrawImageSection.

dgsSetProperty(image,"UVSize",{USize,VSize,relative})
  • USize : The width of the U size of image.
  • VSize : The height of the V size of image.
  • relative :This determines whether UV size is relative. If this is true, then UV size floats must be between 0 and 1, representing UV sizes relative to the pixels of the texture loaded.

UVPos

The uv position image section dgsImageSetUVPosition/dgsImageGetUVPosition. Learn More dxDrawImageSection.

dgsSetProperty(image,"UVPos",{UPos,VPos,relative})
  • UPos : the X coordinate of the top left corner of the section which should be drawn from image.
  • VPos : the Y coordinate of the top left corner of the section which should be drawn from image.
  • relative :This determines whether UV position is relative. If this is true, then UV position floats must be between 0 and 1, representing UV positions relative to the pixels of the texture loaded.

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins