Dgs-dxlabel: Difference between revisions
(→font) |
No edit summary |
||
Line 11: | Line 11: | ||
This is equivalent to [[dgsSetText]]/[[dgsGetText]]. | This is equivalent to [[dgsSetText]]/[[dgsGetText]]. | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"text",text)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"text",text)</syntaxhighlight> | ||
*'''text''' | *'''text:''' A string of the text of the label. | ||
===textColor=== | ===textColor=== | ||
The color which can be translated by [[tocolor]] of the text of the label. | The color which can be translated by [[tocolor]] of the text of the label. | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"textColor",textColor)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"textColor",textColor)</syntaxhighlight> | ||
*'''textColor''' | *'''textColor:''' An integer of the color of the text of the label. | ||
===textSize=== | ===textSize=== | ||
The scale of the text of the label. ''Learn More [[dxDrawText]]'' | The scale of the text of the label. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"textSize",{scaleX,scaleY})</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"textSize",{scaleX,scaleY})</syntaxhighlight> | ||
*'''scaleX''' | *'''scaleX:''' A float of the 2D X scale of the text of the label. | ||
*'''scaleY''' | *'''scaleY:''' A float of the 2D Y scale of the text of the label. | ||
===shadow=== | ===shadow=== | ||
The shadow text of the label. | The shadow text of the label. | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"shadow",{offsetX,offsetY,color,outline})</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"shadow",{offsetX,offsetY,color,outline})</syntaxhighlight> | ||
*'''offsetX''' | *'''offsetX:''' A float of the 2D X offset of the shadow text of the label. | ||
*'''offsetY''' | *'''offsetY:''' A float of the 2D Y offset of the shadow text of the label. | ||
*'''color''' | *'''color:''' An integer of the color of the shadow text of the label. | ||
*'''outline''' | *'''outline:''' A bool of the outline state of the shadow text. | ||
===font=== | ===font=== | ||
This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"font",font)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"font",font)</syntaxhighlight> | ||
*'''font''' | *'''font:''' A string or a [[Element/DX_font|dx font element]] of the text font of the label. | ||
===wordbreak=== | ===wordbreak=== | ||
Whether the word-break is enabled or not. ''Learn More [[dxDrawText]]'' | Whether the word-break is enabled or not. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"wordbreak",wordbreak)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"wordbreak",wordbreak)</syntaxhighlight> | ||
*'''wordbreak''' | *'''wordbreak:''' If set to true, the text will wrap to a new line whenever it reaches the right side of the bounding box. If false, the text will always be completely on one line. | ||
===colorcoded=== | ===colorcoded=== | ||
Whether the color code is enabled or not. ''Learn More [[dxDrawText]]'' | Whether the color code is enabled or not. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"colorcoded",colorcoded)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"colorcoded",colorcoded)</syntaxhighlight> | ||
*'''colorcoded''' | *'''colorcoded:''' Set to true to enable embedded #FFFFFF color codes. | ||
===clip=== | ===clip=== | ||
Whether the clip property is enabled or not. ''Learn More [[dxDrawText]]'' | Whether the clip property is enabled or not. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"clip",clip)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"clip",clip)</syntaxhighlight> | ||
*'''clip''' | *'''clip:''' If set to true, the parts of the text that don't fit within the bounding box will be cut off. | ||
===alignment=== | ===alignment=== | ||
Line 61: | Line 61: | ||
[[dgsLabelSetVerticalAlign]]/[[dgsLabelGetVerticalAlign]] | [[dgsLabelSetVerticalAlign]]/[[dgsLabelGetVerticalAlign]] | ||
<syntaxhighlight lang="lua">dgsSetProperty(label,"alignment",{alignX,alignY})</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(label,"alignment",{alignX,alignY})</syntaxhighlight> | ||
*'''alignX''' | *'''alignX:''' Horizontal alignment of the text within the label. Can be "left", "center" or "right". | ||
*'''alignY''' | *'''alignY:''' Vertical alignment of the text within the label. Can be "top", "center" or "bottom". | ||
==See Also== | ==See Also== | ||
{{DGSPROPERTIES}} | {{DGSPROPERTIES}} |
Revision as of 14:18, 1 October 2019
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxlabel that you could use.
Main Functions
Properties
text
This is equivalent to dgsSetText/dgsGetText.
dgsSetProperty(label,"text",text)
- text: A string of the text of the label.
textColor
The color which can be translated by tocolor of the text of the label.
dgsSetProperty(label,"textColor",textColor)
- textColor: An integer of the color of the text of the label.
textSize
The scale of the text of the label. Learn More dxDrawText
dgsSetProperty(label,"textSize",{scaleX,scaleY})
- scaleX: A float of the 2D X scale of the text of the label.
- scaleY: A float of the 2D Y scale of the text of the label.
shadow
The shadow text of the label.
dgsSetProperty(label,"shadow",{offsetX,offsetY,color,outline})
- offsetX: A float of the 2D X offset of the shadow text of the label.
- offsetY: A float of the 2D Y offset of the shadow text of the label.
- color: An integer of the color of the shadow text of the label.
- outline: A bool of the outline state of the shadow text.
font
This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(label,"font",font)
- font: A string or a dx font element of the text font of the label.
wordbreak
Whether the word-break is enabled or not. Learn More dxDrawText
dgsSetProperty(label,"wordbreak",wordbreak)
- wordbreak: If set to true, the text will wrap to a new line whenever it reaches the right side of the bounding box. If false, the text will always be completely on one line.
colorcoded
Whether the color code is enabled or not. Learn More dxDrawText
dgsSetProperty(label,"colorcoded",colorcoded)
- colorcoded: Set to true to enable embedded #FFFFFF color codes.
clip
Whether the clip property is enabled or not. Learn More dxDrawText
dgsSetProperty(label,"clip",clip)
- clip: If set to true, the parts of the text that don't fit within the bounding box will be cut off.
alignment
Alignment of the text within the label.
The functions as follows are basic on this property.
dgsLabelSetHorizontalAlign/dgsLabelGetHorizontalAlign
dgsLabelSetVerticalAlign/dgsLabelGetVerticalAlign
dgsSetProperty(label,"alignment",{alignX,alignY})
- alignX: Horizontal alignment of the text within the label. Can be "left", "center" or "right".
- alignY: Vertical alignment of the text within the label. Can be "top", "center" or "bottom".
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