Dgs-dxcombobox: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "DGS Properties is always used to change the gui style and make it more fantastic. This page shows the properties of dgs-dxcombobox that you could use. ==Main Functio...")
 
No edit summary
Line 13: Line 13:
*'''alignX:''' Horizontal alignment of the caption text within the combo box. Can be "left", "center" or "right".
*'''alignX:''' Horizontal alignment of the caption text within the combo box. Can be "left", "center" or "right".
*'''alignY:''' Vertical alignment of the caption text within the combo box. Can be "top", "center" or "bottom".
*'''alignY:''' Vertical alignment of the caption text within the combo box. Can be "top", "center" or "bottom".
===autoHideAfterSelected===
This property determines whether the drop down will be hide automatically after selected.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"autoHideAfterSelected",autoHideAfterSelected)</syntaxhighlight>
*'''autoHideAfterSelected:''' A bool indicates whether the drop down will be hide automatically after selected.
===bgColor===
This property determines the background color of the combo box (behind items).
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"bgColor",bgColor)</syntaxhighlight>
*'''bgColor:''' An integer of the color that can be converted by [[tocolor]].
===bgImage===
This property determines the background image of the combo box (behind items).
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"bgImage",bgImage)</syntaxhighlight>
*'''bgImage:''' A material element that serves as the background image of the combo box (texture/shader/screen source/renderTarget).
===captionEdit===
This property stores the caption edit when the caption is editable with [[dgsComboBoxSetEditEnabled]].
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"captionEdit",captionEdit)</syntaxhighlight>
*'''captionEdit:''' A dgs-dxedit element.


===clip===
===clip===
Line 28: Line 48:
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"font",font)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"font",font)</syntaxhighlight>
*'''font:''' A string or a [[Element/DX_font|dx font element]] of the text font of the combo box.
*'''font:''' A string or a [[Element/DX_font|dx font element]] of the text font of the combo box.
===scrollBarThick===
This property determines the thickness of scroll bar.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"scrollBarThick",scrollBarThick)</syntaxhighlight>
*'''scrollBarThick:''' An integer of the thickness of scroll bar.


===shadow===
===shadow===
Line 47: Line 72:
*'''caption:''' A string of the caption text of the combo box.
*'''caption:''' A string of the caption text of the combo box.


===itemHeight===
===itemAlignment===
This property determines the item height of the combo box.
Alignment of the item text within the combo box.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemHeight",itemHeight)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemAlignment",{alignX,alignY})</syntaxhighlight>
*'''itemHeight:''' An integer of item height of the combo box.
*'''alignX:''' Horizontal alignment of the item text within the combo box. Can be "left", "center" or "right".
*'''alignY:''' Vertical alignment of the item text within the combo box. Can be "top", "center" or "bottom".
 
===itemTextPadding===
This property determines the item text padding of combo box.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemTextPadding",{paddingX,alignY})</syntaxhighlight>
*'''paddingX''' : An integer of 2D x padding value.
*'''paddingY''' : An integer of 2D y padding value.
 
===itemColor===
This property determines the 3 states' back ground colors of item.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemColor",{colorNormal,colorHoving,colorSelected})</syntaxhighlight>
*'''colorNormal:''' An integer of the color of the item (Normal State).
*'''colorHoving:''' An integer of the color of the item (Hoving State).
*'''colorSelected:''' An integer of the color of the item (Selected State).
 
===itemImage===
This property determines the 3 states' background image of item.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemImage",{imageDefault,cimageHoving,imageSelected})</syntaxhighlight>
*'''imageNormal:''' A texture of the image of the row (Normal State).
*'''cimageHoving:''' A texture of the image of the row (Hoving State).
*'''imageSelected:''' A texture of the image of the row (Selected State).
 
===itemMoveOffset===
This property stores the move offset of item that is used to render.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemMoveOffset",itemMoveOffset)</syntaxhighlight>
*'''itemMoveOffset:''' A float stores the move offset of item that is used to render.
 
===itemTextColor===
This property determines the color of the item text of the combo box.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemTextColor",itemTextColor)</syntaxhighlight>
*'''itemTextColor:''' An integer of the color that can be converted by [[tocolor]].
 
===itemTextSize===
This property determines the scale of the item text of the combo box.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"itemTextSize",{scaleX,scaleY})</syntaxhighlight>
*'''scaleX:''' A float of the 2D X scale of the text of the item.
*'''scaleY:''' A float of the 2D Y scale of the text of the item.


===moveHardness===
===moveHardness===
Line 67: Line 129:
*'''scaleX:''' A float of the 2D X scale of the text of the combo box.
*'''scaleX:''' A float of the 2D X scale of the text of the combo box.
*'''scaleY:''' A float of the 2D Y scale of the text of the combo box.
*'''scaleY:''' A float of the 2D Y scale of the text of the combo box.
===textBox===
This property determines whether the '''caption''' of combo box is enabled or not.
<syntaxhighlight lang="lua">dgsSetProperty(combobox,"textBox",textBox)</syntaxhighlight>
*'''textBox:''' A bool indicates whether the '''caption''' of combo box is enabled or not.


===wordbreak===
===wordbreak===
Line 72: Line 139:
<syntaxhighlight lang="lua">dgsSetProperty(capiton ,"wordbreak",wordbreak)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(capiton ,"wordbreak",wordbreak)</syntaxhighlight>
*'''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.
*'''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.
==Property of dgs-dxcombobox-Box==
===myCombo===
Combo box is composed by dgs-dxcombobox and dgs-dxcombobox-Box. This property stores the dgs-comboboxof dgs-dxcombobox-Box.
<syntaxhighlight lang="lua">dgsSetProperty(myCombo,"myCombo",myCombo)</syntaxhighlight>
*'''myComboyBox:''' A dgs-dxcombobox element.


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

Revision as of 13:33, 20 May 2020

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

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

Main Functions

Properties

alignment

Alignment of the caption text within the combo box.

dgsSetProperty(combobox,"alignment",{alignX,alignY})
  • alignX: Horizontal alignment of the caption text within the combo box. Can be "left", "center" or "right".
  • alignY: Vertical alignment of the caption text within the combo box. Can be "top", "center" or "bottom".

autoHideAfterSelected

This property determines whether the drop down will be hide automatically after selected.

dgsSetProperty(combobox,"autoHideAfterSelected",autoHideAfterSelected)
  • autoHideAfterSelected: A bool indicates whether the drop down will be hide automatically after selected.

bgColor

This property determines the background color of the combo box (behind items).

dgsSetProperty(combobox,"bgColor",bgColor)
  • bgColor: An integer of the color that can be converted by tocolor.

bgImage

This property determines the background image of the combo box (behind items).

dgsSetProperty(combobox,"bgImage",bgImage)
  • bgImage: A material element that serves as the background image of the combo box (texture/shader/screen source/renderTarget).

captionEdit

This property stores the caption edit when the caption is editable with dgsComboBoxSetEditEnabled.

dgsSetProperty(combobox,"captionEdit",captionEdit)
  • captionEdit: A dgs-dxedit element.

clip

Whether the clip property is enabled (include caption text and item text). Learn More dxDrawText

dgsSetProperty(combobox,"clip",clip)
  • clip: If set to true, the parts of the text that don't fit within the bounding box will be cut off.

colorcoded

Whether the color code is enabled (include caption text and item text). Learn More dxDrawText

dgsSetProperty(combobox,"colorcoded",colorcoded)
  • colorcoded: Set to true to enable embedded #FFFFFF color codes.

font

This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText

dgsSetProperty(combobox,"font",font)

scrollBarThick

This property determines the thickness of scroll bar.

dgsSetProperty(combobox,"scrollBarThick",scrollBarThick)
  • scrollBarThick: An integer of the thickness of scroll bar.

shadow

The shadow of the text of the combo box.

dgsSetProperty(combobox,"shadow",{offsetX,offsetY,color,outline})
  • offsetX: A float of the 2D X offset of the shadow text of the combo box.
  • offsetY: A float of the 2D Y offset of the shadow text of the combo box.
  • color: An integer of the color of the shadow text of the combo box.
  • outline: A bool of the outline state of the shadow text.

myBox

Combo box is composed by dgs-dxcombobox and dgs-dxcombobox-Box. This property stores the dgs-combobox-Box of dgs-dxcombobox.

dgsSetProperty(combobox,"myBox",myBox)
  • myBox: A dgs-dxcombobox-box element.

caption

This property stores the caption text of combo box.

dgsSetProperty(combobox,"caption",caption)
  • caption: A string of the caption text of the combo box.

itemAlignment

Alignment of the item text within the combo box.

dgsSetProperty(combobox,"itemAlignment",{alignX,alignY})
  • alignX: Horizontal alignment of the item text within the combo box. Can be "left", "center" or "right".
  • alignY: Vertical alignment of the item text within the combo box. Can be "top", "center" or "bottom".

itemTextPadding

This property determines the item text padding of combo box.

dgsSetProperty(combobox,"itemTextPadding",{paddingX,alignY})
  • paddingX : An integer of 2D x padding value.
  • paddingY : An integer of 2D y padding value.

itemColor

This property determines the 3 states' back ground colors of item.

dgsSetProperty(combobox,"itemColor",{colorNormal,colorHoving,colorSelected})
  • colorNormal: An integer of the color of the item (Normal State).
  • colorHoving: An integer of the color of the item (Hoving State).
  • colorSelected: An integer of the color of the item (Selected State).

itemImage

This property determines the 3 states' background image of item.

dgsSetProperty(combobox,"itemImage",{imageDefault,cimageHoving,imageSelected})
  • imageNormal: A texture of the image of the row (Normal State).
  • cimageHoving: A texture of the image of the row (Hoving State).
  • imageSelected: A texture of the image of the row (Selected State).

itemMoveOffset

This property stores the move offset of item that is used to render.

dgsSetProperty(combobox,"itemMoveOffset",itemMoveOffset)
  • itemMoveOffset: A float stores the move offset of item that is used to render.

itemTextColor

This property determines the color of the item text of the combo box.

dgsSetProperty(combobox,"itemTextColor",itemTextColor)
  • itemTextColor: An integer of the color that can be converted by tocolor.

itemTextSize

This property determines the scale of the item text of the combo box.

dgsSetProperty(combobox,"itemTextSize",{scaleX,scaleY})
  • scaleX: A float of the 2D X scale of the text of the item.
  • scaleY: A float of the 2D Y scale of the text of the item.

moveHardness

This property determines how hard will the combo box moves when scrolling.

dgsSetProperty(combobox,"moveHardness",moveHardness)
  • moveHardness: A float determins how hard will the combo box moves when scrolling ( should be larger than 0, lower than 1 ).

textColor

The color which can be translated by tocolor of the caption text of the combo box.

dgsSetProperty(combobox,"textColor",textColor)
  • textColor: An integer of the color of the text of the combo box.

textSize

The scale of the capiton text of the combo box. Learn More dxDrawText

dgsSetProperty(combobox,"textSize",{scaleX,scaleY})
  • scaleX: A float of the 2D X scale of the text of the combo box.
  • scaleY: A float of the 2D Y scale of the text of the combo box.

textBox

This property determines whether the caption of combo box is enabled or not.

dgsSetProperty(combobox,"textBox",textBox)
  • textBox: A bool indicates whether the caption of combo box is enabled or not.

wordbreak

Whether the word-break of capiton text is enabled or not. Learn More dxDrawText

dgsSetProperty(capiton ,"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.

Property of dgs-dxcombobox-Box

myCombo

Combo box is composed by dgs-dxcombobox and dgs-dxcombobox-Box. This property stores the dgs-comboboxof dgs-dxcombobox-Box.

dgsSetProperty(myCombo,"myCombo",myCombo)
  • myComboyBox: A dgs-dxcombobox element.


See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins