DGS General Basic Properties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

Revision as of 23:35, 26 May 2018

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

This page shows the general properties of all dgs elements that you could use.

Main Functions

Properties

alpha

Require a number ranges from 0 to 1. This is equivalent to dgsSetAlpha/dgsGetAlpha.

dgsSetProperty(dgsElement,"alpha",alpha = 1)
  • alpha: The visibility/transparency of the DGS element. Ranges from 0 (fully transparent) to 1 (fully opaque). Default value is 0.80.

enabled

Requires a bool value. This is equivalent to dgsSetEnabled/dgsGetEnabled.

dgsSetProperty(dgsElement,"enabled",alpha = true)
  • enabled: The state.

functionRunBefore

Requires a bool value. Set whether the function runs before rendering or after rendering.

dgsSetProperty(dgsElement,"functionRunBefore",functionRunBefore = true)
  • functionRunBefore: Set to true, and the function will run before rendering. Set to false, and the function will run after rendering.

functions

Requires a string in the 3rd argument. This property runs a function while rendering.

See example on dgsSetProperty

dgsSetProperty(dgsElement,"functions",fncString,arg1,arg2,...)
  • fncString: The string of function to be loaded.
  • arg1: argument 1
  • arg2: argument 2
  • ...: other arguments

renderEventCall

Requires a bool value. Set whether onDgsElementRender is triggered when rendering. (Don't always enable this, or it will cause severely performance decrease)

dgsSetProperty(dgsElement,"renderEventCall",renderEventCall = false)
  • PixelInt: Set to true to enable, and false to disable.

ignoreParentTitle

Requires a bool value. Set whether to ignore the title of dgs-dxwindow.

dgsSetProperty(dgsElement,"ignoreParentTitle",ignoreParentTitle = false)
  • PixelInt: Set to true to ignore the title of dgs-dxwindow if its parent is a dgs-dxwindow . Set to false to disable it, which means the y position of dgsElement in dgs-dxwindow will start to be calculated under the title.

PixelInt

Requires a bool value. Set whether the position/size of a dgs element is converted to integer while rendering, which deal with blur problem.

dgsSetProperty(dgsElement,"PixelInt",PixelInt = true)
  • PixelInt: Set to true to enable, and false to disable.

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins