<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SFX</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SFX"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/SFX"/>
	<updated>2026-06-25T05:30:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Dgs-dxbutton&amp;diff=77077</id>
		<title>Dgs-dxbutton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Dgs-dxbutton&amp;diff=77077"/>
		<updated>2023-06-18T10:45:58Z</updated>

		<summary type="html">&lt;p&gt;SFX: Added disabledColor property&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Dgs|DGS]] Properties is always used to change the gui style and make it more fantastic.&lt;br /&gt;
&lt;br /&gt;
This page shows the properties of dgs-dxbutton that you could use.&lt;br /&gt;
&lt;br /&gt;
==Main Functions==&lt;br /&gt;
*[[dgsSetProperty]]&lt;br /&gt;
*[[dgsGetProperty]]&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
===alignment===&lt;br /&gt;
Alignment of the text within the button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;alignment&amp;quot;,{alignX,alignY})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''alignX:''' Horizontal alignment of the text within the button. Can be &amp;quot;left&amp;quot;, &amp;quot;center&amp;quot; or &amp;quot;right&amp;quot;.&lt;br /&gt;
*'''alignY:''' Vertical alignment of the text within the button. Can be &amp;quot;top&amp;quot;, &amp;quot;center&amp;quot; or &amp;quot;bottom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===clickOffset===&lt;br /&gt;
The offset indicates that how much the text of the button will shift when it is clicked.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;clickOffset&amp;quot;,{offsetX,offsetY})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''offsetX''' : A float of the 2D X offset relative to the position of the button.&lt;br /&gt;
*'''offsetY''' : A float of the 2D Y offset relative to the position of the button.&lt;br /&gt;
&lt;br /&gt;
===color===&lt;br /&gt;
The color which can be translated by [[tocolor]] of the background of the button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;color&amp;quot;,{normalColor,hoveringColor,clickedColor})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''normalColor:''' An integer of the color of the background of the button ( neither selected nor clicked by mouse ).&lt;br /&gt;
*'''hoveringColor:''' An integer of the color of the background of the button which is selected.&lt;br /&gt;
*'''clickedColor:''' An integer of the color of the background of the button which is clicked.&lt;br /&gt;
&lt;br /&gt;
===disabledColor===&lt;br /&gt;
The color which can be translated by [[tocolor]] of the background of the button when disabled.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;disabledColor&amp;quot;,disabledColor)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''disabledColor:''' An integer of the color of the background of the button when disabled.&lt;br /&gt;
&lt;br /&gt;
===colorCoded===&lt;br /&gt;
Whether the color code is enabled or not. ''Learn More [[dxDrawText]]''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;colorCoded&amp;quot;,colorCoded)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''colorCoded''' : Set to true to enable embedded #FFFFFF color codes.&lt;br /&gt;
&lt;br /&gt;
===colorTransitionPeriod===&lt;br /&gt;
This property sets the transition period among colors (normal, hovering, clicked).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;colorTransitionPeriod&amp;quot;,colorTransitionPeriod)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''colorTransitionPeriod''' : An integer indicates the transition time in miliseconds. ( Set to 0 to disable )&lt;br /&gt;
&lt;br /&gt;
===font===&lt;br /&gt;
This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;font&amp;quot;,font)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''font''' : A [[Element/DX_font|dx font element]] of the text font of the button.&lt;br /&gt;
&lt;br /&gt;
===iconAlignment===&lt;br /&gt;
Alignment of the icon within the button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconAlignment&amp;quot;,{alignX,alignY})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''alignX:''' Horizontal alignment of the icon within the button. Can be &amp;quot;left&amp;quot;, &amp;quot;center&amp;quot; or &amp;quot;right&amp;quot;.&lt;br /&gt;
*'''alignY:''' Vertical alignment of the icon within the button. Can be &amp;quot;top&amp;quot;, &amp;quot;center&amp;quot; or &amp;quot;bottom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===iconColor===&lt;br /&gt;
This property enables you to change the icon color (Work with '''iconImage''').&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconColor&amp;quot;,{normalColor,hoveringColor,clickedColor})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''normalColor:''' An integer of the color of the icon image of the button ( neither selected nor clicked by mouse ).&lt;br /&gt;
*'''hoveringColor:''' An integer of the color of the icon image of the button which is selected.&lt;br /&gt;
*'''clickedColor:''' An integer of the color of the icon image of the button which is clicked.&lt;br /&gt;
&lt;br /&gt;
===iconImage===&lt;br /&gt;
Require [texture/shader] that can be used as the icon image of button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconImage&amp;quot;,{normalImage,hoveringImage,clickedImage})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''normalImage:''' A texture/shader element of the icon image of the button ( neither selected nor clicked by mouse ). ( You can pass a nil value to disable this option )&lt;br /&gt;
*'''hoveringImage:''' A texture/shader element of the  icon image of the button which is selected. ( You can pass a nil value to disable this option )&lt;br /&gt;
*'''clickedImage:''' A texture/shader element of the  icon image of the button which is clicked. ( You can pass a nil value to disable this option )&lt;br /&gt;
&lt;br /&gt;
===iconOffset===&lt;br /&gt;
This property enables you to change the offset of the icon from the text (Work with '''iconImage''').&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconOffset&amp;quot;,{iconOffsetX,iconOffsetY,relative})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''iconOffsetX''' : An integer of the 2D X offset in pixels to the position of the icon.&lt;br /&gt;
*'''iconOffsetY''' : An integer of the 2D Y offset in pixels to the position of the icon.&lt;br /&gt;
*'''relative''' : A bool of whether the iconOffset is relative to the height of text or absolute pixels.&lt;br /&gt;
&lt;br /&gt;
===iconRelative===&lt;br /&gt;
This property determines whether the icon is relative to the text or button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconRelative&amp;quot;,iconRelative)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''iconRelative:''' A bool  determines whether the icon is relative to the text or button.&lt;br /&gt;
&lt;br /&gt;
===iconShadow===&lt;br /&gt;
The shadow icon image of the button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconShadow&amp;quot;,{offsetX,offsetY,color})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''offsetX''' : A float of the 2D X offset of the shadow icon of the button.&lt;br /&gt;
*'''offsetY''' : A float of the 2D Y offset of the shadow icon of the button.&lt;br /&gt;
*'''color''' : An integer of the color of the shadow icon of the button.&lt;br /&gt;
&lt;br /&gt;
===iconSize===&lt;br /&gt;
This property enables you to change the icon size (Work with '''iconImage''').&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;iconSize&amp;quot;,{iconSizeX,iconSizeY,relative})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''iconSizeX''' : An integer of the 2D X scale to the position of the icon image.&lt;br /&gt;
*'''iconSizeY''' : An integer of the 2D Y scale to the position of the icon image.&lt;br /&gt;
*'''relative''' : A bool of whether the iconSize is relative to the height of text or absolute pixels.&lt;br /&gt;
&lt;br /&gt;
===image===&lt;br /&gt;
Require [texture/shader] that can be used as the background of button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;image&amp;quot;,image)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''image:''' A texture/shader element of the background of the button&lt;br /&gt;
Or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;image&amp;quot;,{normalImage,hoveringImage,ClickedImage})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''normalImage:''' A texture/shader element of the background of the button ( neither selected nor clicked by mouse ). ( You can pass a nil value to disable this image option )&lt;br /&gt;
*'''hoveringImage:''' A texture/shader element of the background of the button which is selected. ( You can pass a nil value to disable this image option )&lt;br /&gt;
*'''clickedImage:''' A texture/shader element of the background of the button which is clicked. ( You can pass a nil value to disable this image option )&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
This is equivalent to [[dgsSetText]]/[[dgsGetText]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;text&amp;quot;,text)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''text''' : A string of the text of the button.&lt;br /&gt;
&lt;br /&gt;
===textColor===&lt;br /&gt;
The color which can be translated by [[tocolor]] of the text of the button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;textColor&amp;quot;,textColor)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''textColor''' : An integer of the color of the text of the button.&lt;br /&gt;
&lt;br /&gt;
===textOffset===&lt;br /&gt;
The offset of the text on button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;textOffset&amp;quot;,{offsetX,offsetY,relative})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''offsetX''' : A float of the 2D X offset relative to the position of the button, depends on '''relative'''.&lt;br /&gt;
*'''offsetY''' : A float of the 2D Y offset relative to the position of the button, depends on '''relative'''.&lt;br /&gt;
*'''relative''' : A bool of whether the offset is relative or absolute.&lt;br /&gt;
&lt;br /&gt;
===textSize===&lt;br /&gt;
The scale of the text of the button. ''Learn More [[dxDrawText]]''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;textSize&amp;quot;,{scaleX,scaleY})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''scaleX''' : A float of the 2D X scale of the text of the button.&lt;br /&gt;
*'''scaleY''' : A float of the 2D Y scale of the text of the button.&lt;br /&gt;
&lt;br /&gt;
===shadow===&lt;br /&gt;
The shadow text of the button.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;shadow&amp;quot;,{offsetX,offsetY,color})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''offsetX''' : A float of the 2D X offset of the shadow text of the button.&lt;br /&gt;
*'''offsetY''' : A float of the 2D Y offset of the shadow text of the button.&lt;br /&gt;
*'''color''' : An integer of the color of the shadow text of the button.&lt;br /&gt;
&lt;br /&gt;
===wordBreak===&lt;br /&gt;
Whether the word-break is enabled or not. ''Learn More [[dxDrawText]]''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dgsSetProperty(button,&amp;quot;wordBreak&amp;quot;,wordBreak)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''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.&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSPROPERTIES}}&lt;/div&gt;</summary>
		<author><name>SFX</name></author>
	</entry>
</feed>