Dgs-dxbutton: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 27: Line 27:


===textcolor===
===textcolor===
<syntaxhighlight lang="lua">dgsDxGUISetProperty(button,"textcolor",0xFFFFFFFF)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsDxGUISetProperty(button,"textcolor",textcolor)</syntaxhighlight>
*'''textcolor''' : An integer of the color of the text of the button. ''The color can be translated by [[tocolor]]''
*'''textcolor''' : An integer of the color of the text of the button. ''The color can be translated by [[tocolor]]''



Revision as of 13:10, 9 September 2017

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

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

Main Functions

Properties

image

Require [texture/shader] that can be used as the background of button.

dgsDxGUISetProperty(button,"image",{defimg,hovimg,cliimg})
  • defimg: A texture/shader element of the background of the button ( neither selected npr clicked by mouse ). ( You can pass a nil value to disable this image option )
  • selimg: A texture/shader element of the background of the button which is selected. ( You can pass a nil value to disable this image option )
  • cliimg: A texture/shader element of the background of the button which is clicked. ( You can pass a nil value to disable this image option )

color

Require integer that can be used as the background color of button.

dgsDxGUISetProperty(button,"color",{defcolor,hovcolor,clicolor})
  • defcolor: An integer of the color of the background of the button ( neither selected nor clicked by mouse ).
  • selcolor: An integer of the color of the background of the button which is selected.
  • clicolor: An integer of the color of the background of the button which is clicked.

text

dgsDxGUISetProperty(button,"text",text)
  • text : A string of the text of the button. This is equivalent to dgsDxGUISetText

textcolor

dgsDxGUISetProperty(button,"textcolor",textcolor)
  • textcolor : An integer of the color of the text of the button. The color can be translated by tocolor

textsize

shadow

shadow

font

clickoffset

clickType

wordbreak

colorcoded

rightbottom