Dgs-dxmemo

From Multi Theft Auto: Wiki
Revision as of 12:26, 18 November 2017 by Thisdp (talk | contribs) (→‎showPos)
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-dxmemo that you could use.

Main Functions

Properties

text

This is equivalent to dgsDxGUISetText/dgsDxGUIGetText.

dgsDxGUISetProperty(memo,"text",text)
  • text : A table of the text of the memo.( Because of multi lines, I use table instead of string )

textLength

This is for scroll bar detection. You had better not touch it.

dgsDxGUISetProperty(memo,"textLength",textlen)
  • textlen : A table stores the length of text in every line.

textcolor

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

dgsDxGUISetProperty(memo,"textcolor",textcolor)
  • textcolor : An integer of the color of the text of the memo.

textsize

The scale of the text of the memo. Learn More dxDrawText

dgsDxGUISetProperty(memo,"textsize",{scaleX,scaleY})
  • scaleX : A float of the 2D X scale of the text of the memo.
  • scaleY : A float of the 2D Y scale of the text of the memo.

cursorposXY

The position in which the caret stays.

dgsDxGUISetProperty(memo,"cursorposXY",{index,line})
  • index : An integer of the index of the text in current line of the memo.
  • line : An integer of the line of the memo.

selectfrom

The position from which the text is selected.

dgsDxGUISetProperty(memo,"selectfrom",{index,line})
  • index : An integer of the index of the text in the line where the text is selected from of the memo.
  • line : An integer of the line where the text is selected from of the memo.

font

This is equivalent to dgsDxGUISetFont/dgsDxGUIGetFont. Learn More dxDrawText

dgsDxGUISetProperty(memo,"font",font)

rightLength

The max value of the index and line of the memo. This is for scroll bar detection.

dgsDxGUISetProperty(memo,"rightLength",{index,line})
  • index : An integer of the max value of the index of the memo.
  • line : An integer of the max value of the line of the memo.

showPos

The min value of the x position of the text of the memo starts to show in the render target. ( I don't know how to explain it. XD )

dgsDxGUISetProperty(memo,"showPos",posX)
  • posX : An integer indicates how many the pixels of the text are moved to left.

clip

Whether the clip property is enabled or not. Learn More dxDrawText

dgsDxGUISetProperty(memo,"clip",clip)
  • clip : If set to true, the parts of the text that don't fit within the bounding box will be cut off.

rightbottom

Alignment of the text within the memo

dgsDxGUISetProperty(memo,"rightbottom",{alignX,alignY})
  • alignX : Horizontal alignment of the text within the memo. Can be "left", "center" or "right".
  • alignY : Vertical alignment of the text within the memo. Can be "top", "center" or "bottom".