Dgs-dxscrollbar

From Multi Theft Auto: Wiki
Revision as of 11:41, 20 May 2020 by Thisdp (talk | contribs)
Jump to navigation Jump to search

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 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.

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.

length

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

dgsSetProperty(scrollbar,"length",{length,relative})
  • length: 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.

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.

position

This is equivalent to dgsScrollBarSetScrollPosition/dgsScrollBarGetScrollPosition.

dgsSetProperty(scrollbar,"position",position)
  • position: An integer of the scroll poisition of the scroll bar.

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.

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.

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