DGS General Basic Properties
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.
clickCoolDown
This property is used to limit the click frequency to a specific dgs element
dgsSetProperty(dgsElement,"clickCoolDown",clickCoolDown = false)
- clickCoolDown: A number indicates how long you want to limit the click (ms).
changeOrder
Require a bool indicates whether the layer will be changed when being brought to front ( or clicked ).
dgsSetProperty(dgsElement,"changeOrder",changeOrder = true)
- changeOrder: A bool indicates whether the layer will be changed when being brought to front ( or clicked ).
debugTrace
This property stores the "debug tracing data" includes in which lua file and line the specific dgs element created (Only available using loadstring(exports.dgs:dgsImportFunction())().
dgsSetProperty(dgsElement,"debugTrace",debugTrace)
- debugTrace: A table stores creation data. Structure is as follows:
{ file=filePath, line=lineNum, fncName=functionName, }
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 (see property functions).
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 at the 3rd argument. This property runs a function while rendering.
Predefine Variable
- self: The DGS Element itself.
See example in dgsSetProperty
dgsSetProperty(dgsElement,"functions",fncString,arg1,arg2,...)
- fncString: The string of function to be loaded.
- arg1: argument 1
- arg2: argument 2
- ...: other arguments
hitoutofparent
Requires a bool value. Set whether children elements are clickable when they are outside of their parent element.
dgsSetProperty(dgsElement,"hitoutofparent",hitoutofparent = false)
- hitoutofparent: If set to true, the dgsElement's child elements are clickable even though they are not inside the bounding box of dgsElement.
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)
- renderEventCall: 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)
- ignoreParentTitle: 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 deals with blur problem.
dgsSetProperty(dgsElement,"PixelInt",PixelInt = true)
- PixelInt: Set to true to enable, and false to disable.
postGUI
Requires a bool value. Set whether the dgs element is post gui when render settings "postGUI" is nil(automatic).
dgsSetProperty(dgsElement,"postGUI",postGUI)
- postGUI: Set to true to enable post gui, or it wil under gui.
outline
The border line of the bounding box of dgs element.
dgsSetProperty(dgsElement,"outline",{side,width,color,left,right,up,down})
- side : A string indicates which side the outline will attach to. The available values are as follows:
- in
- center
- out
- width: The width of the outline.
- color: The color of the outline, which can be transformed by tocolor.
- left: Set true to show outline in the left, and false to hide it. (Default is true if not set)
- right: Set true to show the outline in the right, and false to hide it. (Default is true if not set)
- up: Set true to show the outline in the up, and false to hide it. (Default is true if not set)
- down: Set true to show the outline in the down, and false to hide it. (Default is true if not set)
See Also
General Properties
Unique Properties For DGS Core Elements
- dgs-dx3dinterface
- dgs-dx3dimage
- dgs-dx3dtext
- dgs-dx3dline
- dgs-dxbutton
- dgs-dxcheckbox
- dgs-dxcombobox
- dgs-dxdetectarea
- dgs-dxedit
- dgs-dxgridlist
- dgs-dximage
- dgs-dxlabel
- dgs-dxline
- dgs-dxmemo
- dgs-dxprogressbar
- dgs-dxradiobutton
- dgs-dxscrollbar
- dgs-dxscrollpane
- dgs-dxselector
- dgs-dxswitchbutton
- dgs-dxtabpanel
- dgs-dxtab
- dgs-dxwindow