Dgs-dxtab: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 36: Line 36:
This property determines the color of the tab button. Different from '''bgColor'''
This property determines the color of the tab button. 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.
'''hoveringColor:''' An integer of the color of the tab button which is hovered on.
*'''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.
*'''selectedColor:''' An integer of the color of the tab button which is selected.


===tabImage===
===tabImage===

Revision as of 18:50, 13 January 2021

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

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