Dgs-dxtab: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 9: Line 9:
==Properties==
==Properties==
===bgColor===
===bgColor===
This property determines the default background color of the tab in the tab panel. Different from '''tabColor'''
This property determines the background color in the tab panel when current tab is selected, if this is not set, [[dgs-dxtabpanel#bgColor|bgColor of tab panel]] will be used. [[. Different from '''tabColor'''
<syntaxhighlight lang="lua">dgsSetProperty(tabpanel,"bgColor",bgColor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(tab,"bgColor",bgColor)</syntaxhighlight>
*'''bgColor:''' An integer of the color that can be converted by [[tocolor]].
*'''bgColor:''' An integer of the color that can be converted by [[tocolor]].


===bgImage===
===bgImage===
This property determines the default background image of the tab in the tab panel. Different from '''tabImage'''
This property determines the background image in the tab panel when current tab is selected, if this is not set, [[dgs-dxtabpanel#bgImage|bgImage of tab panel]] will be used. Different from '''tabImage'''
<syntaxhighlight lang="lua">dgsSetProperty(tab,"bgImage",bgImage)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(tab,"bgImage",bgImage)</syntaxhighlight>
*'''bgImage:''' A material element that serves as the background image of the tab. ( Passing a nil value can disable this option )
*'''bgImage:''' A material element that serves as the background image of the tab. ( Passing a nil value can disable this option )
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.
Line 41: Line 41:


===tabColor===
===tabColor===
This property determines the color of the tab button. Different from '''bgColor'''
This property determines the color of the tab button, if this is not set, [[dgs-dxtab#tabColor|tabColor of tab panel]] will be used. Different from '''bgColor'''
<syntaxhighlight lang="lua">dgsSetProperty(tab,"tabColor",{defaultColor,hoveringColor,selectedColor})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(tab,"tabColor",{defaultColor,hoveringColor,selectedColor})</syntaxhighlight>
*'''defaultColor:''' An integer of the color of the normal tab button.
*'''defaultColor:''' An integer of the color of the normal tab button.
Line 48: Line 48:


===tabImage===
===tabImage===
This property determines the image of the tab button. Different from '''bgImage'''
This property determines the image of the tab button, if this is not set, [[dgs-dxtab#tabImage|tabImage of tab panel]] . Different from '''bgImage'''
<syntaxhighlight lang="lua">dgsSetProperty(tab,"tabImage",{defaultImage,hoveringImage,selectedImage})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(tab,"tabImage",{defaultImage,hoveringImage,selectedImage})</syntaxhighlight>
*'''defaultImage:''' A material element of the normal tab button. ( Passing a nil value can disable this option )
*'''defaultImage:''' A material element of the normal tab button. ( Passing a nil value can disable this option )

Latest revision as of 09:55, 7 May 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 background color in the tab panel when current tab is selected, if this is not set, bgColor of tab panel will be used. [[. Different from tabColor

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

bgImage

This property determines the background image in the tab panel when current tab is selected, if this is not set, bgImage of tab panel will be used. 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, if this is not set, tabColor of tab panel will be used. 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, if this is not set, tabImage of tab panel . 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