Dgs-dxtab: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 34: Line 34:


===shadow===
===shadow===
The shadow text of the tab. If isn't specified, '''shadow''' of tabpanel will be used.
The shadow text of the tab. If not specified, '''shadow''' of tabpanel will be used.
<syntaxhighlight lang="lua">dgsSetProperty(tab,"shadow",{offsetX,offsetY,color})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(tab,"shadow",{offsetX,offsetY,color})</syntaxhighlight>
*'''offsetX:''' A float of the 2D X offset of the shadow text of the tab.
*'''offsetX:''' A float of the 2D X offset of the shadow text of the tab.

Revision as of 02:51, 11 March 2022

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

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

Main Functions

Properties

bgColor

This property determines the default background color of the tab in the tab panel. Different from tabColor

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

bgImage

This property determines the default background image of the tab in the tab panel. Different from tabImage

dgsSetProperty(tab,"bgImage",bgImage)
  • bgImage: A material element that serves as the background image of the tab. ( Passing a nil value can disable this option )

font

This property determines the default font of tabs. This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText

dgsSetProperty(tab,"font",font)
  • font: A dx font element of the default text font of the tab panel.

id

Tis property stores the id of the tab.

dgsSetProperty(tab,"id",id)
  • id : The id of the tab.

parent

This property stores the parent tab panel of tab.

dgsSetProperty(tab,"parent",parent)
  • parent: The tab panel parent

shadow

The shadow text of the tab. If not specified, shadow of tabpanel will be used.

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

tabColor

This property determines the color of the tab button. Different from bgColor

dgsSetProperty(tab,"tabColor",{defaultColor,hoveringColor,selectedColor})
  • defaultColor: An integer of the color of the normal tab button.
  • hoveringColor: An integer of the color of the tab button which is hovered on.
  • selectedColor: An integer of the color of the tab button which is selected.

tabImage

This property determines the image of the tab button. Different from bgImage

dgsSetProperty(tab,"tabImage",{defaultImage,hoveringImage,selectedImage})
  • defaultImage: A material element of the normal tab button. ( Passing a nil value can disable this option )
  • hoveringImage: A material element of the tab button which is hovered on. ( Passing a nil value can disable this option )
  • selectedImage: A material element of the tab button which is selected. ( Passing a nil value can disable this option )

text

This is equivalent to dgsSetText/dgsGetText.

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

textColor

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

Usage 1:

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

Usage 2:

dgsSetProperty(tab,"textColor",{ColorNormal,ColorHover,ColorClick})
  • ColorNormal: An integer of the color of the text under normal state.
  • ColorHover: An integer of the color of the text under hovering state.
  • ColorClick: An integer of the color of the text under clicked state.

textSize

The scale of the text of the tab button. Learn More dxDrawText

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

width

This property stores the width of the tab (exclude tab gap).

dgsSetProperty(tab,"width",width)
  • width: An integer indicates the width of the tab in pixels

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins