Dgs-dxscrollbar: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "DGS Properties is always used to change the gui style and make it more fantastic. This page shows the properties of dgs-dx3dtext that you could use. ==Main Functions...")
 
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Dgs|DGS]] Properties is always used to change the gui style and make it more fantastic.
[[Dgs|DGS]] Properties is always used to change the gui style and make it more fantastic.


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


==Main Functions==
==Main Functions==
Line 8: Line 8:


==Properties==
==Properties==
===arrowWidth===
This property adjusts the width of arrow ( take vertical scroll bar as a standard ).
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"arrowWidth",{arrowWidth,relative})</syntaxhighlight>
*'''arrowWidth:''' A number of the width of arrow, which is affected by '''relative'''.
*'''relative:''' A bool of whether the width is relative or not. If this is true, then length must be between 0 and 1.
===arrowColor===
===arrowColor===
The arrow color of scroll bar, includes normal, hovering, click.
The arrow color of scroll bar, includes normal, hovering, click.
Line 14: Line 20:
*'''arrowColorHover:''' An integer of the arrow color when the mouse's cursor is hovering on it, which can be converted by [[tocolor]].
*'''arrowColorHover:''' An integer of the arrow color when the mouse's cursor is hovering on it, which can be converted by [[tocolor]].
*'''arrowColorClick:''' An integer of the arrow color when the arrow gets clicked, which can be converted by [[tocolor]].
*'''arrowColorClick:''' An integer of the arrow color when the arrow gets clicked, which can be converted by [[tocolor]].
===arrowImage===
The arrow image of scroll bar.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"arrowImage",arrowImage)</syntaxhighlight>
*'''arrowImage:''' A material element of the arrow image of scroll bar.


===cursorColor===
===cursorColor===
Line 21: Line 32:
*'''cursorColorHover:''' An integer of the cursor color when the mouse's cursor is hovering on it, which can be converted by [[tocolor]].
*'''cursorColorHover:''' An integer of the cursor color when the mouse's cursor is hovering on it, which can be converted by [[tocolor]].
*'''cursorColorClick:''' An integer of the cursor color when the cursor gets clicked, which can be converted by [[tocolor]].
*'''cursorColorClick:''' An integer of the cursor color when the cursor gets clicked, which can be converted by [[tocolor]].
===cursorImage===
The cursor image of scroll bar.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"cursorImage",cursorImage)</syntaxhighlight>
*'''cursorImage:''' A material element of the cursor image of scroll bar.
===cursorWidth===
This property adjusts the width of cursor ( take vertical scroll bar as a standard ).
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"cursorWidth",{cursorWidth,relative})</syntaxhighlight>
*'''cursorWidth:''' A number of the width of cursor, which is affected by '''relative'''.
*'''relative:''' A bool of whether the width is relative or not. If this is true, then length must be between 0 and 1.
===grades===
This property stores the grades of scroll bar. ''See [[dgsScrollBarSetGrades]]/[[dgsScrollBarGetGrades]]''
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"grades",grades)</syntaxhighlight>
*'''grades:''' A number of the grades of scroll bar.
===currentGrade===
This property stores the current grade of scroll bar if ''grades'' enabled.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"currentGrade",currentGrade)</syntaxhighlight>
*'''currentGrade:''' A number of the current grade, ranges from 0 to ''grades''.


===image===
===image===
Line 29: Line 61:
*'''troughImage:''' A texture of the image of trough.
*'''troughImage:''' A texture of the image of trough.


===length===
===imageRotation===
This property solves the problem of the rotation of the images.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"imageRotation",{Horizontal,Vertical})</syntaxhighlight>
*'''Horizontal:''' A table includes arrowImageRotation,cursorImageRotation,troughImageRotation of horizontal scroll bar, by default:
<syntaxhighlight lang="lua" >{0,270,270}</syntaxhighlight>
*'''Vertical:''' A table includes arrowImageRotation,cursorImageRotation,troughImageRotation of vertical scroll bar, by default:
<syntaxhighlight lang="lua" >{270,0,0}</syntaxhighlight>
 
===cursorLength===
This property determines whether the length of the cursor of scroll bar.
This property determines whether the length of the cursor of scroll bar.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"length",{length,relative})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"cursorLength",{cursorLength,relative})</syntaxhighlight>
*'''length:''' A number of the length of scroll bar, which is affected by '''relative'''.
*'''cursorLength:''' A number of the length of scroll bar, which is affected by '''relative'''.
*'''relative:''' A bool of whether the length is relative or not. If this is true, then length must be between 0 and 1.
*'''relative:''' A bool of whether the length is relative or not. If this is true, then length must be between 0 and 1.


Line 39: Line 79:
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"locked",locked)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"locked",locked)</syntaxhighlight>
*'''locked:''' A bool of whether the scroll bar get locked or not.
*'''locked:''' A bool of whether the scroll bar get locked or not.
===map===
This property will map the value from 0~100 to mapMin~mapMax (Both get and set scroll position).
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"map",{mapMin,mapMax})</syntaxhighlight>
*'''mapMin:''' A number of the min value.
*'''mapMax:''' A number of the max value.


===multiplier===
===multiplier===
Line 48: Line 94:
*'''relative:''' A bool of whether the multiplier is relative or not. If this is true, then multiplier must be between 0 and 1.
*'''relative:''' A bool of whether the multiplier is relative or not. If this is true, then multiplier must be between 0 and 1.


===position===
===scrollPosition===
This is equivalent to [[dgsScrollBarSetScrollPosition]]/[[dgsScrollBarGetScrollPosition]].
This is equivalent to [[dgsScrollBarSetScrollPosition]]/[[dgsScrollBarGetScrollPosition]].
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"position",position)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"scrollPosition",scrollPosition)</syntaxhighlight>
*'''position:''' An integer of the scroll poisition of the scroll bar.
*'''scrollPosition:''' An integer of the scroll poisition of the scroll bar. Ranges from 0 to 100.


===scrollArrow===
===scrollArrow===
Line 57: Line 103:
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"scrollArrow",scrollArrow)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"scrollArrow",scrollArrow)</syntaxhighlight>
*'''scrollArrow:''' A bool of whether enable the scroll arrow or not.
*'''scrollArrow:''' A bool of whether enable the scroll arrow or not.
===troughClickAction===
This property determines what will the scroll bar do when you click the trough.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"troughClickAction",troughClickAction)</syntaxhighlight>
*'''troughClickAction:''' A string. Available values are as follows:
**'''none:''' No actions.
**'''step:''' Step up or down.
**'''jump:''' Make cursor of scroll bar jump to the current place you click.


===troughColor===
===troughColor===
The trough color of scroll bar.
The trough color of scroll bar.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"troughColor",troughColor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"troughColor",{troughColorPart1,troughColorPart2})</syntaxhighlight>
*'''troughColor:''' An integer of the trough color, which can be converted by [[tocolor]].
*'''troughColorPart1:''' An integer of the trough color on the left/top side of the cursor, which can be converted by [[tocolor]].
*'''troughColorPart2:''' An integer of the trough color on the right/bottom side of the cursor, which can be converted by [[tocolor]].
 
===troughImageSectionMode===
This property will toggle section mode or stretch mode.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"troughImageSectionMode",troughImageSectionMode)</syntaxhighlight>
*'''troughImageSectionMode:''' A bool indicates whether to enable section mode of the image or keep stretch mode of the trough image.
 
===troughWidth===
This property adjusts the width of trough ( take vertical scroll bar as a standard ).
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"troughWidth",{troughWidth,relative})</syntaxhighlight>
*'''troughWidth:''' A number of the width of arrow, which is affected by '''relative'''.
*'''relative:''' A bool of whether the width is relative or not. If this is true, then length must be between 0 and 1.
 
===troughImage===
The trough image of scroll bar.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"troughImage",troughImage)</syntaxhighlight>
*'''troughImage:''' A material element of the trough image of scroll bar.
 
===wheelReversed===
This property determines whether the increasing/decreasing direction is reversed when using mouse wheel.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"wheelReversed",wheelReversed)</syntaxhighlight>
*'''wheelReversed:''' A bool indicates whether the increasing/decreasing direction is reversed when using mouse wheel.


===voh===
===isHorizontal===
This property determines whether the scroll bar is horizontal or vertical.
This property determines whether the scroll bar is horizontal or vertical.
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"voh",voh)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(scrollbar,"isHorizontal",isHorizontal)</syntaxhighlight>
*'''voh:''' Available values are as follows:
*'''isHorizontal:''' Available values are as follows:
**'''false:''' vertical
**'''false:''' vertical
**'''true:''' horizontal
**'''true:''' horizontal

Latest revision as of 01:20, 2 September 2024

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

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

Main Functions

Properties

arrowWidth

This property adjusts the width of arrow ( take vertical scroll bar as a standard ).

dgsSetProperty(scrollbar,"arrowWidth",{arrowWidth,relative})
  • arrowWidth: A number of the width of arrow, which is affected by relative.
  • relative: A bool of whether the width is relative or not. If this is true, then length must be between 0 and 1.

arrowColor

The arrow color of scroll bar, includes normal, hovering, click.

dgsSetProperty(scrollbar,"arrowColor",{arrowColorNormal,arrowColorHover,arrowColorClick})
  • arrowColorNormal: An integer of the arrow color, which can be converted by tocolor.
  • arrowColorHover: An integer of the arrow color when the mouse's cursor is hovering on it, which can be converted by tocolor.
  • arrowColorClick: An integer of the arrow color when the arrow gets clicked, which can be converted by tocolor.

arrowImage

The arrow image of scroll bar.

dgsSetProperty(scrollbar,"arrowImage",arrowImage)
  • arrowImage: A material element of the arrow image of scroll bar.

cursorColor

The cursor color of scroll bar, includes normal, hovering, click.

dgsSetProperty(scrollbar,"cursorColor",{cursorColorNormal,cursorColorHover,cursorColorClick})
  • cursorColorNormal: An integer of the cursor color, which can be converted by tocolor.
  • cursorColorHover: An integer of the cursor color when the mouse's cursor is hovering on it, which can be converted by tocolor.
  • cursorColorClick: An integer of the cursor color when the cursor gets clicked, which can be converted by tocolor.

cursorImage

The cursor image of scroll bar.

dgsSetProperty(scrollbar,"cursorImage",cursorImage)
  • cursorImage: A material element of the cursor image of scroll bar.

cursorWidth

This property adjusts the width of cursor ( take vertical scroll bar as a standard ).

dgsSetProperty(scrollbar,"cursorWidth",{cursorWidth,relative})
  • cursorWidth: A number of the width of cursor, which is affected by relative.
  • relative: A bool of whether the width is relative or not. If this is true, then length must be between 0 and 1.

grades

This property stores the grades of scroll bar. See dgsScrollBarSetGrades/dgsScrollBarGetGrades

dgsSetProperty(scrollbar,"grades",grades)
  • grades: A number of the grades of scroll bar.

currentGrade

This property stores the current grade of scroll bar if grades enabled.

dgsSetProperty(scrollbar,"currentGrade",currentGrade)
  • currentGrade: A number of the current grade, ranges from 0 to grades.

image

The image of scroll bar, includes arrow, cursor and trough.

dgsSetProperty(scrollbar,"image",{arrowImage,cursorImage,troughImage})
  • arrowImage: A texture of the image of arrow.
  • cursorImage: A texture of the image of cursor.
  • troughImage: A texture of the image of trough.

imageRotation

This property solves the problem of the rotation of the images.

dgsSetProperty(scrollbar,"imageRotation",{Horizontal,Vertical})
  • Horizontal: A table includes arrowImageRotation,cursorImageRotation,troughImageRotation of horizontal scroll bar, by default:
{0,270,270}
  • Vertical: A table includes arrowImageRotation,cursorImageRotation,troughImageRotation of vertical scroll bar, by default:
{270,0,0}

cursorLength

This property determines whether the length of the cursor of scroll bar.

dgsSetProperty(scrollbar,"cursorLength",{cursorLength,relative})
  • cursorLength: A number of the length of scroll bar, which is affected by relative.
  • relative: A bool of whether the length is relative or not. If this is true, then length must be between 0 and 1.

locked

This is equivalent to dgsScrollBarSetLocked/dgsScrollBarGetLocked.

dgsSetProperty(scrollbar,"locked",locked)
  • locked: A bool of whether the scroll bar get locked or not.

map

This property will map the value from 0~100 to mapMin~mapMax (Both get and set scroll position).

dgsSetProperty(scrollbar,"map",{mapMin,mapMax})
  • mapMin: A number of the min value.
  • mapMax: A number of the max value.

multiplier

This property determines whether how much a scroll bar will scroll when you click the arrow or use mouse wheel.

This property is difficult to understand. Before use this property, do an experiment first.

dgsSetProperty(scrollbar,"multiplier",{multiplier,relative})
  • multiplier: A number of the multiplier of scroll bar, which is affected by relative.
  • relative: A bool of whether the multiplier is relative or not. If this is true, then multiplier must be between 0 and 1.

scrollPosition

This is equivalent to dgsScrollBarSetScrollPosition/dgsScrollBarGetScrollPosition.

dgsSetProperty(scrollbar,"scrollPosition",scrollPosition)
  • scrollPosition: An integer of the scroll poisition of the scroll bar. Ranges from 0 to 100.

scrollArrow

This property indicates whether enable the scroll arrow or not. It is useful when making scroll bar act as slide or something else.

dgsSetProperty(scrollbar,"scrollArrow",scrollArrow)
  • scrollArrow: A bool of whether enable the scroll arrow or not.

troughClickAction

This property determines what will the scroll bar do when you click the trough.

dgsSetProperty(scrollbar,"troughClickAction",troughClickAction)
  • troughClickAction: A string. Available values are as follows:
    • none: No actions.
    • step: Step up or down.
    • jump: Make cursor of scroll bar jump to the current place you click.

troughColor

The trough color of scroll bar.

dgsSetProperty(scrollbar,"troughColor",{troughColorPart1,troughColorPart2})
  • troughColorPart1: An integer of the trough color on the left/top side of the cursor, which can be converted by tocolor.
  • troughColorPart2: An integer of the trough color on the right/bottom side of the cursor, which can be converted by tocolor.

troughImageSectionMode

This property will toggle section mode or stretch mode.

dgsSetProperty(scrollbar,"troughImageSectionMode",troughImageSectionMode)
  • troughImageSectionMode: A bool indicates whether to enable section mode of the image or keep stretch mode of the trough image.

troughWidth

This property adjusts the width of trough ( take vertical scroll bar as a standard ).

dgsSetProperty(scrollbar,"troughWidth",{troughWidth,relative})
  • troughWidth: A number of the width of arrow, which is affected by relative.
  • relative: A bool of whether the width is relative or not. If this is true, then length must be between 0 and 1.

troughImage

The trough image of scroll bar.

dgsSetProperty(scrollbar,"troughImage",troughImage)
  • troughImage: A material element of the trough image of scroll bar.

wheelReversed

This property determines whether the increasing/decreasing direction is reversed when using mouse wheel.

dgsSetProperty(scrollbar,"wheelReversed",wheelReversed)
  • wheelReversed: A bool indicates whether the increasing/decreasing direction is reversed when using mouse wheel.

isHorizontal

This property determines whether the scroll bar is horizontal or vertical.

dgsSetProperty(scrollbar,"isHorizontal",isHorizontal)
  • isHorizontal: Available values are as follows:
    • false: vertical
    • true: horizontal

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins