Dgs-dxradiobutton: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 19: Line 19:
*'''alignX:''' Horizontal alignment of the text within the radiobutton. Can be "left", "center" or "right".
*'''alignX:''' Horizontal alignment of the text within the radiobutton. Can be "left", "center" or "right".
*'''alignY:''' Vertical alignment of the text within the radiobutton. Can be "top", "center" or "bottom".
*'''alignY:''' Vertical alignment of the text within the radiobutton. Can be "top", "center" or "bottom".
===buttonAlignment===
This property determines alignment of the button of the radio button.
The functions as follows are basic on this property.
[[dgsRadioButtonSetButtonAlign]]/[[dgsRadioButtonGetButtonAlign]]
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"buttonAlignment",buttonAlignment)</syntaxhighlight>
*'''buttonAlignment''' A string indicates the alignment of the button of radio button. Can be "left" or "right".
===buttonSide===
This property determines side of the button of the radio button.
The functions as follows are basic on this property.
[[dgsRadioButtonSetButtonSide]]/[[dgsRadioButtonGetButtonSide]]
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"buttonSide",buttonSide)</syntaxhighlight>
*'''buttonSide''' A string indicates the side of the button of radio button. Can be "left" or "right".
===buttonSize===
This property determines the button size of the radio button.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"buttonSize",{size,relative})</syntaxhighlight>
*'''size:''' A number of the size of the button on screen.
*'''relative:''' A bool indicates whether the size is relative or absolute.
<syntaxhighlight lang="lua">dgsSetProperty(checkbox,"buttonSize",{width,height,relative})</syntaxhighlight>
*'''width:''' A number of the width of the button on screen.
*'''height:''' A number of the height of the button on screen.
*'''relative:''' A bool indicates whether the size is relative or absolute.


===clip===
===clip===
Line 25: Line 54:
*'''clip:''' If set to true, the parts of the text that don't fit within the bounding box will be cut off.
*'''clip:''' If set to true, the parts of the text that don't fit within the bounding box will be cut off.


===color_f===
===colorUnchecked===
This property determines the color of the icon under 3 conditions when the radio button is unchecked.
This property determines the color of the icon under 3 conditions when the radio button is unchecked.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"color_f",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"colorUnchecked",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight>
*'''ColorNormal:''' An integer of the color of the icon under normal state. (unchecked)
*'''ColorNormal:''' An integer of the color of the icon under normal state. (unchecked)
*'''ColorHover:''' An integer of the color of the icon under hovering state. (unchecked)
*'''ColorHover:''' An integer of the color of the icon under hovering state. (unchecked)
*'''ColorClick:''' An integer of the color of the icon under clicked state. (unchecked)
*'''ColorClick:''' An integer of the color of the icon under clicked state. (unchecked)


===color_t===
===colorChecked===
This property determines the color of the icon under 3 conditions when the radio button is checked.
This property determines the color of the icon under 3 conditions when the radio button is checked.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"color_t",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"colorChecked",{ColorNormal,ColorHover,ColorClick})</syntaxhighlight>
*'''ColorNormal:''' An integer of the color of the icon under normal state. (checked)
*'''ColorNormal:''' An integer of the color of the icon under normal state. (checked)
*'''ColorHover:''' An integer of the color of the icon under hovering state. (checked)
*'''ColorHover:''' An integer of the color of the icon under hovering state. (checked)
*'''ColorClick:''' An integer of the color of the icon under clicked state. (checked)
*'''ColorClick:''' An integer of the color of the icon under clicked state. (checked)


===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(radiobutton,"colorcoded",colorcoded)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"colorCoded",colorCoded)</syntaxhighlight>
*'''colorcoded:''' Set to true to enable embedded #FFFFFF color codes.
*'''colorCoded:''' Set to true to enable embedded #FFFFFF color codes.


===font===
===font===
Line 49: Line 78:
*'''font:''' A string or a [[Element/DX_font|dx font element]] of the text font of the radiobutton.
*'''font:''' A string or a [[Element/DX_font|dx font element]] of the text font of the radiobutton.


===image_f===
===imageUnchecked===
This property determines the icon under 3 conditions when the radio button is unchecked.
This property determines the icon under 3 conditions when the radio button is unchecked.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"image_f",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"imageUnchecked",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight>
*'''ImageNormal:''' An image element of the icon under normal state. (unchecked)
*'''ImageNormal:''' An image element of the icon under normal state. (unchecked)
*'''ImageHover:''' An image element of the icon under hovering state. (unchecked)
*'''ImageHover:''' An image element of the icon under hovering state. (unchecked)
*'''ImageClick:''' An image element of the icon under clicked state. (unchecked)
*'''ImageClick:''' An image element of the icon under clicked state. (unchecked)


===image_t===
===imageChecked===
This property determines the icon under 3 conditions when the radio button is checked.
This property determines the icon under 3 conditions when the radio button is checked.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"image_t",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"imageChecked",{ImageNormal,ImageHover,ImageClick})</syntaxhighlight>
*'''ImageNormal:''' An image element of the icon under normal state. (checked)
*'''ImageNormal:''' An image element of the icon under normal state. (checked)
*'''ImageHover:''' An image element of the icon under hovering state. (checked)
*'''ImageHover:''' An image element of the icon under hovering state. (checked)
Line 81: Line 110:
*'''textColor:''' An integer of the color of the text of the radiobutton.
*'''textColor:''' An integer of the color of the text of the radiobutton.


===textImageSpace===
===textOffset===
This property determines the space between the text and icon.
The offset of the title text of radio button.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"textImageSpace",textImageSpace)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"textOffset",{offsetX,offsetY,relative})</syntaxhighlight>
*'''textImageSpace''' A float of the distance from the icon to the text of the radio button.
*'''offsetX''' : A float of the 2D X offset relative to the position of the text of radio button, depends on '''relative'''.
*'''offsetY''' : A float of the 2D Y offset relative to the position of the text of radio button, depends on '''relative'''.
*'''relative''' : A bool of whether the offset is relative or absolute.
 
===textPadding===
This property determines the padding between the text and icon.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"textPadding",textPadding)</syntaxhighlight>
*'''textPadding:''' A float of the distance from the icon to the text of the radio button.


===textSize===
===textSize===
Line 92: Line 128:
*'''scaleY:''' A float of the 2D Y scale of the text of the radiobutton.
*'''scaleY:''' A float of the 2D Y scale of the text of the radiobutton.


===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(radiobutton,"wordbreak",wordbreak)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"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.


==Additional Property For Parent Element==
==Additional Property For Parent Element==

Latest revision as of 16:03, 5 February 2023

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

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

Main Functions

Properties

alignment

Alignment of the text within the radiobutton.

The functions as follows are basic on this property.

dgsRadioButtonSetHorizontalAlign/dgsRadioButtonGetHorizontalAlign

dgsRadioButtonSetVerticalAlign/dgsRadioButtonGetVerticalAlign

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

buttonAlignment

This property determines alignment of the button of the radio button.

The functions as follows are basic on this property.

dgsRadioButtonSetButtonAlign/dgsRadioButtonGetButtonAlign

dgsSetProperty(radiobutton,"buttonAlignment",buttonAlignment)
  • buttonAlignment A string indicates the alignment of the button of radio button. Can be "left" or "right".

buttonSide

This property determines side of the button of the radio button.

The functions as follows are basic on this property.

dgsRadioButtonSetButtonSide/dgsRadioButtonGetButtonSide

dgsSetProperty(radiobutton,"buttonSide",buttonSide)
  • buttonSide A string indicates the side of the button of radio button. Can be "left" or "right".

buttonSize

This property determines the button size of the radio button.

dgsSetProperty(radiobutton,"buttonSize",{size,relative})
  • size: A number of the size of the button on screen.
  • relative: A bool indicates whether the size is relative or absolute.
dgsSetProperty(checkbox,"buttonSize",{width,height,relative})
  • width: A number of the width of the button on screen.
  • height: A number of the height of the button on screen.
  • relative: A bool indicates whether the size is relative or absolute.

clip

Whether the clip property is enabled or not. Learn More dxDrawText

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

colorUnchecked

This property determines the color of the icon under 3 conditions when the radio button is unchecked.

dgsSetProperty(radiobutton,"colorUnchecked",{ColorNormal,ColorHover,ColorClick})
  • ColorNormal: An integer of the color of the icon under normal state. (unchecked)
  • ColorHover: An integer of the color of the icon under hovering state. (unchecked)
  • ColorClick: An integer of the color of the icon under clicked state. (unchecked)

colorChecked

This property determines the color of the icon under 3 conditions when the radio button is checked.

dgsSetProperty(radiobutton,"colorChecked",{ColorNormal,ColorHover,ColorClick})
  • ColorNormal: An integer of the color of the icon under normal state. (checked)
  • ColorHover: An integer of the color of the icon under hovering state. (checked)
  • ColorClick: An integer of the color of the icon under clicked state. (checked)

colorCoded

Whether the color code is enabled or not. Learn More dxDrawText

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

font

This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText

dgsSetProperty(radiobutton,"font",font)

imageUnchecked

This property determines the icon under 3 conditions when the radio button is unchecked.

dgsSetProperty(radiobutton,"imageUnchecked",{ImageNormal,ImageHover,ImageClick})
  • ImageNormal: An image element of the icon under normal state. (unchecked)
  • ImageHover: An image element of the icon under hovering state. (unchecked)
  • ImageClick: An image element of the icon under clicked state. (unchecked)

imageChecked

This property determines the icon under 3 conditions when the radio button is checked.

dgsSetProperty(radiobutton,"imageChecked",{ImageNormal,ImageHover,ImageClick})
  • ImageNormal: An image element of the icon under normal state. (checked)
  • ImageHover: An image element of the icon under hovering state. (checked)
  • ImageClick: An image element of the icon under clicked state. (checked)

shadow

The shadow text of the radiobutton.

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

text

This is equivalent to dgsSetText/dgsGetText.

dgsSetProperty(radiobutton,"text",text)
  • text: A string of the text of the radiobutton.

textColor

The color which can be translated by tocolor of the text of the radiobutton.

dgsSetProperty(radiobutton,"textColor",textColor)
  • textColor: An integer of the color of the text of the radiobutton.

textOffset

The offset of the title text of radio button.

dgsSetProperty(radiobutton,"textOffset",{offsetX,offsetY,relative})
  • offsetX : A float of the 2D X offset relative to the position of the text of radio button, depends on relative.
  • offsetY : A float of the 2D Y offset relative to the position of the text of radio button, depends on relative.
  • relative : A bool of whether the offset is relative or absolute.

textPadding

This property determines the padding between the text and icon.

dgsSetProperty(radiobutton,"textPadding",textPadding)
  • textPadding: A float of the distance from the icon to the text of the radio button.

textSize

The scale of the text of the radiobutton. Learn More dxDrawText

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

wordBreak

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

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

Additional Property For Parent Element

RadioButton

This property stores which radio button is selected.

dgsSetProperty(parent,"RadioButton",RadioButton)
  • RadioButton: The radio button that is selected.

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins