Dgs-dxradiobutton: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
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".
===buttonPosition===
This property determines the button position of radio button.
<syntaxhighlight lang="lua">dgsSetProperty(radiobutton,"buttonPosition",buttonPosition)</syntaxhighlight>
*'''buttonPosition''' A string indicates the position 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===

Revision as of 04:50, 7 June 2022

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".

buttonPosition

This property determines the button position of radio button.

dgsSetProperty(radiobutton,"buttonPosition",buttonPosition)
  • buttonPosition A string indicates the position 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.

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