Dgs-dxmemo: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
 
(37 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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-dxmemo that you could use.
This page shows the properties of dgs-dxmemo that you could use.


==Main Functions==
==Main Functions==
*[[dgsDxGUISetProperty]]
*[[dgsSetProperty]]
*[[dgsDxGUIGetProperty]]
*[[dgsGetProperty]]


==Properties==
==Properties==
===text===
===allowCopy===
This is equivalent to [[dgsDxGUISetText]]/[[dgsDxGUIGetText]].
This property determines whether the content of memo can be copy(ctrl+c)/cut(ctrl+x)
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"text",text)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"allowCopy",allowCopy)</syntaxhighlight>
*'''text''' : A ''table'' of the text of the memo.( Because of multi lines, I use table instead of string )
*'''allowCopy:''' A boolean value of the state of whether this memo allows users to copy something from it.


===textLength===
===bgColor===
This is for scroll bar detection. You had better not touch it.
This property determines the background color of the memo.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"textLength",textlen)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"bgColor",bgColor)</syntaxhighlight>
*'''textlen''' : A table stores the length of text in every line.
*'''bgColor:''' An integer of the color that can be converted by [[tocolor]].


===textcolor===
===bgColorBlur===
The color of the text of the memo which can be translated by [[tocolor]].
This property determines the background color of the memo when it is blurred.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"textcolor",textcolor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"bgColorBlur",bgColorBlur)</syntaxhighlight>
*'''textcolor''' : An integer of the color of the text of the memo.
*'''bgColorBlur:''' An integer of the color that can be converted by [[tocolor]], leave to nil to use bgColor.


===textsize===
===bgImage===
The scale of the text of the memo. ''Learn More [[dxDrawText]]''
This property determines the background image of the memo.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"textsize",{scaleX,scaleY})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"bgImage",bgImage)</syntaxhighlight>
*'''scaleX''' : A float of the 2D X scale of the text of the memo.
*'''bgImage:''' A material element that serves as the background image of the memo (texture/shader/screen source/renderTarget).
*'''scaleY''' : A float of the 2D Y scale of the text of the memo.


===cursorposXY===
===bgImageBlur===
The position in which the caret stays.
This property determines the background image of the memo when it is blurred.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"cursorposXY",{index,line})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"bgImageBlur",bgImageBlur)</syntaxhighlight>
*'''index''' : An integer of the index of the text in current line of the memo.
*'''bgImageBlur:''' A material element that serves as the background image of the memo (texture/shader/screen source/renderTarget), leave to nil to use bgImage.
*'''line''' : An integer of the line of the memo.


===selectfrom===
===caretColor===
The position from which the text is selected.
This property determines the color of the caret
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"selectfrom",{index,line})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretColor",caretColor)</syntaxhighlight>
*'''index''' : An integer of the index of the text in the line where the text is selected from of the memo.
*'''caretColor:''' An integer of the color that can be converted by [[tocolor]].
*'''line''' : An integer of the line where the text is selected from of the memo.


===font===
===caretHeight===
This is equivalent to [[dgsDxGUISetFont]]/[[dgsDxGUIGetFont]]. ''Learn More [[dxDrawText]]''
The height of the caret of the memo (multiple of the font height).
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"font",font)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretHeight",caretHeight)</syntaxhighlight>
*'''font''' : A [[Element/DX_font|dx font element]] of the text font of the memo.
*'''caretHeight:''' A float of the caret height.


===rightLength===
===caretOffset===
The max value of the index and line of the memo. This is for scroll bar detection.
The offset of the caret of the memo.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"rightLength",{index,line})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretOffset",offsetY)</syntaxhighlight>
*'''index''' : An integer of the max value of the index of the memo.
*'''offsetY:''' A float of the 2D Y position offset of the caret of the memo.
*'''line''' : An integer of the max value of the line of the memo.


===showPos===
===caretPos===
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 )
The position in which the caret stays.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"showPos",posX)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretPos",{index,line})</syntaxhighlight>
*'''posX''' : An integer indicates how many the pixels of the text are moved to left.
*'''index:''' An integer of the index of the text in current line of the memo.
*'''line:'''  An integer of the line of the memo.


===showLine===
===caretStyle===
The min value of the line of the text of the memo starts to show in the render target. ( I don't know how to explain it. XD )
This is equivalent to [[dgsMemoSetCaretStyle]]/[[dgsMemoGetCaretStyle]].
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"showLine",line)</syntaxhighlight>
*'''line''' : An integer indicates how many lines are moved to top.


===cursorStyle===
This property allows us to change the style of caret of the memo. ( 0 is "|"; 1 is "_" )
This property allows us to change the style of caret of the memo. ( 0 is "|"; 1 is "_" )


Line 72: Line 66:


This is Text_
This is Text_
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"cursorStyle",cursorStyle)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretStyle",caretStyle)</syntaxhighlight>
*'''cursorStyle''' : An integer of the caret style of the memo.
*'''caretStyle:''' An integer of the caret style of the memo.


===cursorThick===
===caretThick===
This property allows us to change the thickness of caret of the memo.
This property allows us to change the thickness of caret of the memo.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"cursorThick",cursorThick)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretThick",caretThick)</syntaxhighlight>
*'''cursorThick''' : An integer of the thickness of the caret of the memo.
*'''caretThick:''' An integer of the thickness of the caret of the memo.


===scrollBarThick===
===font===
This property allows us to change the thickness of scroll bars of the memo.
This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]''
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"scrollBarThick",scrollBarThick)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"font",font)</syntaxhighlight>
*'''scrollBarThick''' : An integer of the thickness of scroll bars of the memo.
*'''font:'''  A [[Element/DX_font|dx font element]] of the text font of the memo.
 
===padding===
This property determines the content padding from 4 sides of element (left/top/right/bottom)
<syntaxhighlight lang="lua">dgsSetProperty(memo,"padding", {horizontal, vertical})</syntaxhighlight>
*'''horizontal:'''  A float of the horizontal padding in pixels.
*'''vertical:'''  A float of the vertical padding in pixels.
 
===placeHolder===
This is equivalent to [[dgsEditSetPlaceHolder]]//[[dgsEditGetPlaceHolder]]
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolder",placeHolder)</syntaxhighlight>
*'''placeHolder''' : A string of the place holder text of dgs edit ( This text will show when there is no text in a blurred dgs edit ).


===cursorOffset===
===placeHolderColor===
The offset of the caret of the memo.
This property determines the color of the place holder text. The color which can be translated by [[tocolor]].
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"cursorOffset",{offsetX,offsetY})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderColor",placeHolderColor)</syntaxhighlight>
*'''offsetX''' : A float of the 2D X position offset of the caret of the memo.
*'''placeHolderColor''' : An integer of the color of the place holder text of the edit.
*'''offsetY''' : A float of the 2D Y position offset of the caret of the memo.


===readOnly===
===placeHolderColorcoded===
This is equivalent to [[dgsDxMemoSetReadOnly]]/[[dgsDxMemoGetReadOnly]].
This property determines whether the place holder supports color code.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"readOnly",readOnly)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderColorcoded",placeHolderColorcoded)</syntaxhighlight>
*'''readOnly''' : A bool indicates whether the memo is only readable.
*'''placeHolderColorcoded''' : A bool indicates whether the place holder supports color code.


===readOnlyCaretShow===
===placeHolderFont===
Whether use math.floor when calculating position and size of memo.
This property changes the font of place holder.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderFont",placeHolderFont)</syntaxhighlight>
*'''readOnlyCaretShow''' : A bool indicates whether the caret is shown or hidden when the memo is read-only.
*'''placeHolderFont''' : A string/dx-font element of the font of the place holder.


===side===
===placeHolderIgnoreRenderTarget===
The border size of the memo.
This property determines whether the place holder isn't restricted by render target.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"side",side)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderIgnoreRenderTarget",placeHolderIgnoreRenderTarget)</syntaxhighlight>
*'''side''' : A float of the border size of the memo.
*'''placeHolderIgnoreRenderTarget''' : A bool indicates whether the place holder isn't restricted by render target.


===sidecolor===
===placeHolderOffset===
The border color of the memo.( Format: tocolor(r,g,b,a) )
This property allows place holder has offsets relative to its original position.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"sidecolor",sidecolor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderOffset",{ xOffset, yOffset })</syntaxhighlight>
*'''sidecolor''' : An integer of the color of the border of the memo.
*'''xOffset''' : An integer of 2D x offset.
*'''yOffset''' : An integer of 2D y offset.


===useFloor===
===placeHolderVisibleWhenFocus===
Whether use math.floor when calculating position and size of memo.
This property allows place holder to be visible even when edit is focused.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"useFloor",useFloor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(edit,"placeHolderVisibleWhenFocus",placeHolderVisibleWhenFocus)</syntaxhighlight>
*'''useFloor''' : A bool indicates whether to use math.floor when calculating position and size of memo.
*'''placeHolderVisibleWhenFocus''' : A bool indicates whether the place holder when the edit is focused.


===selectcolor===
===readOnly===
The color of the rectangle of test selection of the memo.
This is equivalent to [[dgsMemoSetReadOnly]]/[[dgsMemoGetReadOnly]].
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"selectcolor",selectcolor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"readOnly",readOnly)</syntaxhighlight>
*'''selectcolor''' : An integer of the color of the rectangle of test selection of the memo.
*'''readOnly:''' A bool indicates whether the memo is only readable.


===memo===
===readOnlyCaretShow===
This property stores a gui-memo which is used to input characters.
Whether the caret of memo will show/hide under read-only mode.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"memo",gmemo)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)</syntaxhighlight>
*'''gmemo''' : A gui-memo.
*'''readOnlyCaretShow:''' A bool indicates whether the caret is shown or hidden when the memo is read-only.


===renderTarget===
===renderTarget===
This property stores a render target of the memo.
This property stores a render target of the memo.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"renderTarget",renderTarget)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"renderTarget",renderTarget)</syntaxhighlight>
*'''renderTarget''' : A render target that is used to render the text.
*'''renderTarget:''' A render target that is used to render the text.


===scrollbars===
===scrollbars===
This property stores two scroll bars of the memo.
This property stores two scroll bars which can be got by [[dgsMemoGetScrollBar]] of the memo.
<syntaxhighlight lang="lua">dgsDxGUISetProperty(memo,"scrollbars",{Vertical,Horizontal})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollbars",{Vertical,Horizontal})</syntaxhighlight>
*'''Vertical''' : A vertical scroll bar of the memo.
*'''Vertical:''' A vertical scroll bar of the memo.
*'''Horizontal''' : A horizontal scroll bar of the memo.
*'''Horizontal:'''  A horizontal scroll bar of the memo.
 
===scrollBarThick===
This property allows us to change the thickness of scroll bars of the memo.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollBarThick",scrollBarThick)</syntaxhighlight>
*'''scrollBarThick:'''  An integer of the thickness of scroll bars of the memo.
 
===scrollSize===
This property determines how many lines will get scrolled out of the rendering area once when you are scrolling your mouse wheel.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollSize",scrollSize)</syntaxhighlight>
*'''scrollSize:'''  Lines to be scrolled.
 
===selectColorBlur===
The color which can be translated by [[tocolor]] of the rectangle of text selection of the memo when blurred.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"selectColorBlur",selectColorBlur)</syntaxhighlight>
*'''selectColorBlur:'''  An integer of the color of the rectangle of text selection of the memo when blurred.
 
===selectColor===
The color which can be translated by [[tocolor]] of the rectangle of text selection of the memo.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"selectColor",selectColor)</syntaxhighlight>
*'''selectColor:'''  An integer of the color of the rectangle of text selection of the memo.
 
===selectFrom===
The position from which the text is selected.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"selectFrom",{index,line})</syntaxhighlight>
*'''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.
 
===shadow===
The shadow text of the memo.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"shadow",{offsetX,offsetY,color,outline})</syntaxhighlight>
*'''offsetX:''' A float of the 2D X offset of the shadow text of the memo.
*'''offsetY:''' A float of the 2D Y offset of the shadow text of the memo.
*'''color:''' An integer of the color of the shadow text of the memo.
*'''outline:''' An integer of the outline style of the shadow text.
 
===showLine===
This property stores the value of how many lines does the text move to top.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"showLine",line)</syntaxhighlight>
*'''line:'''  An integer indicates how many lines does the text move to top.
 
===showPos===
This property stores the value of how many pixels of the text are moved to left.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"showPos",posX)</syntaxhighlight>
*'''posX:'''  An integer indicates how many pixels of the text are moved to left.
 
===text===
This is equivalent to [[dgsSetText]]/[[dgsGetText]].
<syntaxhighlight lang="lua">dgsSetProperty(memo,"text",text)</syntaxhighlight>
*'''text:'''  A ''table'' of the text of the memo.( Because of multi lines, I use table instead of string )
 
===textColor===
The color which can be translated by [[tocolor]] of the text of the memo.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"textColor",textColor)</syntaxhighlight>
*'''textColor:'''  An integer of the color of the text of the memo.
 
===textLength===
This is for scroll bar detection. You had better not touch it.
<syntaxhighlight lang="lua">dgsSetProperty(memo,"textLength",textlen)</syntaxhighlight>
*'''textlen:'''  A table stores the length of text in every line.
 
===textSize===
The scale of the text of the memo. ''Learn More [[dxDrawText]]''
<syntaxhighlight lang="lua">dgsSetProperty(memo,"textSize",{scaleX,scaleY})</syntaxhighlight>
*'''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.
 
===typingSound===
Typing sound, nil for disabled. This is equivalent to [[dgsMemoSetTypingSound]]/[[dgsMemoGetTypingSound]]
<syntaxhighlight lang="lua">dgsSetProperty(memo,"typingSound",typingSound)</syntaxhighlight>
*'''typingSound:'''  A string of the path/url of typing sound.
 
===typingSoundVolume===
Typing sound, nil for disabled. This is equivalent to [[dgsMemoSetTypingSoundVolume]]/[[dgsMemoGetTypingSoundVolume]]
<syntaxhighlight lang="lua">dgsSetProperty(memo,"typingSoundVolume",typingSoundVolume)</syntaxhighlight>
*'''typingSoundVolume:'''  A float of the volume of the typing sound. Range is from 0.0 to 1.0. This can go above 1.0 for amplification.
 
===wordWrap===
This property determines the word wrap state of dgs memo. This is equivalent to [[dgsMemoSetWordWrapState]]/[[dgsMemoGetWordWrapState]]
<syntaxhighlight lang="lua">dgsSetProperty(memo,"wordWrap",wordWrap)</syntaxhighlight>
*'''wordWarp:'''  An integer or a bool of word wrap state, vaild state are as follows:
**'''false:''' Non-wordwrap
**'''1:''' Split via single character ( This will break a word into 2 parts )
**'''2:''' Split via word
 
==See Also==
{{DGSPROPERTIES}}

Latest revision as of 06:24, 11 June 2023

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

allowCopy

This property determines whether the content of memo can be copy(ctrl+c)/cut(ctrl+x)

dgsSetProperty(memo,"allowCopy",allowCopy)
  • allowCopy: A boolean value of the state of whether this memo allows users to copy something from it.

bgColor

This property determines the background color of the memo.

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

bgColorBlur

This property determines the background color of the memo when it is blurred.

dgsSetProperty(memo,"bgColorBlur",bgColorBlur)
  • bgColorBlur: An integer of the color that can be converted by tocolor, leave to nil to use bgColor.

bgImage

This property determines the background image of the memo.

dgsSetProperty(memo,"bgImage",bgImage)
  • bgImage: A material element that serves as the background image of the memo (texture/shader/screen source/renderTarget).

bgImageBlur

This property determines the background image of the memo when it is blurred.

dgsSetProperty(memo,"bgImageBlur",bgImageBlur)
  • bgImageBlur: A material element that serves as the background image of the memo (texture/shader/screen source/renderTarget), leave to nil to use bgImage.

caretColor

This property determines the color of the caret

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

caretHeight

The height of the caret of the memo (multiple of the font height).

dgsSetProperty(memo,"caretHeight",caretHeight)
  • caretHeight: A float of the caret height.

caretOffset

The offset of the caret of the memo.

dgsSetProperty(memo,"caretOffset",offsetY)
  • offsetY: A float of the 2D Y position offset of the caret of the memo.

caretPos

The position in which the caret stays.

dgsSetProperty(memo,"caretPos",{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.

caretStyle

This is equivalent to dgsMemoSetCaretStyle/dgsMemoGetCaretStyle.

This property allows us to change the style of caret of the memo. ( 0 is "|"; 1 is "_" )

Example(0):

This is Text|

Example(1):

This is Text_

dgsSetProperty(memo,"caretStyle",caretStyle)
  • caretStyle: An integer of the caret style of the memo.

caretThick

This property allows us to change the thickness of caret of the memo.

dgsSetProperty(memo,"caretThick",caretThick)
  • caretThick: An integer of the thickness of the caret of the memo.

font

This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText

dgsSetProperty(memo,"font",font)

padding

This property determines the content padding from 4 sides of element (left/top/right/bottom)

dgsSetProperty(memo,"padding", {horizontal, vertical})
  • horizontal: A float of the horizontal padding in pixels.
  • vertical: A float of the vertical padding in pixels.

placeHolder

This is equivalent to dgsEditSetPlaceHolder//dgsEditGetPlaceHolder

dgsSetProperty(edit,"placeHolder",placeHolder)
  • placeHolder : A string of the place holder text of dgs edit ( This text will show when there is no text in a blurred dgs edit ).

placeHolderColor

This property determines the color of the place holder text. The color which can be translated by tocolor.

dgsSetProperty(edit,"placeHolderColor",placeHolderColor)
  • placeHolderColor : An integer of the color of the place holder text of the edit.

placeHolderColorcoded

This property determines whether the place holder supports color code.

dgsSetProperty(edit,"placeHolderColorcoded",placeHolderColorcoded)
  • placeHolderColorcoded : A bool indicates whether the place holder supports color code.

placeHolderFont

This property changes the font of place holder.

dgsSetProperty(edit,"placeHolderFont",placeHolderFont)
  • placeHolderFont : A string/dx-font element of the font of the place holder.

placeHolderIgnoreRenderTarget

This property determines whether the place holder isn't restricted by render target.

dgsSetProperty(edit,"placeHolderIgnoreRenderTarget",placeHolderIgnoreRenderTarget)
  • placeHolderIgnoreRenderTarget : A bool indicates whether the place holder isn't restricted by render target.

placeHolderOffset

This property allows place holder has offsets relative to its original position.

dgsSetProperty(edit,"placeHolderOffset",{ xOffset, yOffset })
  • xOffset : An integer of 2D x offset.
  • yOffset : An integer of 2D y offset.

placeHolderVisibleWhenFocus

This property allows place holder to be visible even when edit is focused.

dgsSetProperty(edit,"placeHolderVisibleWhenFocus",placeHolderVisibleWhenFocus)
  • placeHolderVisibleWhenFocus : A bool indicates whether the place holder when the edit is focused.

readOnly

This is equivalent to dgsMemoSetReadOnly/dgsMemoGetReadOnly.

dgsSetProperty(memo,"readOnly",readOnly)
  • readOnly: A bool indicates whether the memo is only readable.

readOnlyCaretShow

Whether the caret of memo will show/hide under read-only mode.

dgsSetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)
  • readOnlyCaretShow: A bool indicates whether the caret is shown or hidden when the memo is read-only.

renderTarget

This property stores a render target of the memo.

dgsSetProperty(memo,"renderTarget",renderTarget)
  • renderTarget: A render target that is used to render the text.

scrollbars

This property stores two scroll bars which can be got by dgsMemoGetScrollBar of the memo.

dgsSetProperty(memo,"scrollbars",{Vertical,Horizontal})
  • Vertical: A vertical scroll bar of the memo.
  • Horizontal: A horizontal scroll bar of the memo.

scrollBarThick

This property allows us to change the thickness of scroll bars of the memo.

dgsSetProperty(memo,"scrollBarThick",scrollBarThick)
  • scrollBarThick: An integer of the thickness of scroll bars of the memo.

scrollSize

This property determines how many lines will get scrolled out of the rendering area once when you are scrolling your mouse wheel.

dgsSetProperty(memo,"scrollSize",scrollSize)
  • scrollSize: Lines to be scrolled.

selectColorBlur

The color which can be translated by tocolor of the rectangle of text selection of the memo when blurred.

dgsSetProperty(memo,"selectColorBlur",selectColorBlur)
  • selectColorBlur: An integer of the color of the rectangle of text selection of the memo when blurred.

selectColor

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

dgsSetProperty(memo,"selectColor",selectColor)
  • selectColor: An integer of the color of the rectangle of text selection of the memo.

selectFrom

The position from which the text is selected.

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

shadow

The shadow text of the memo.

dgsSetProperty(memo,"shadow",{offsetX,offsetY,color,outline})
  • offsetX: A float of the 2D X offset of the shadow text of the memo.
  • offsetY: A float of the 2D Y offset of the shadow text of the memo.
  • color: An integer of the color of the shadow text of the memo.
  • outline: An integer of the outline style of the shadow text.

showLine

This property stores the value of how many lines does the text move to top.

dgsSetProperty(memo,"showLine",line)
  • line: An integer indicates how many lines does the text move to top.

showPos

This property stores the value of how many pixels of the text are moved to left.

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

text

This is equivalent to dgsSetText/dgsGetText.

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

textColor

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

dgsSetProperty(memo,"textColor",textColor)
  • textColor: An integer of the color of the text of the memo.

textLength

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

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

textSize

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

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

typingSound

Typing sound, nil for disabled. This is equivalent to dgsMemoSetTypingSound/dgsMemoGetTypingSound

dgsSetProperty(memo,"typingSound",typingSound)
  • typingSound: A string of the path/url of typing sound.

typingSoundVolume

Typing sound, nil for disabled. This is equivalent to dgsMemoSetTypingSoundVolume/dgsMemoGetTypingSoundVolume

dgsSetProperty(memo,"typingSoundVolume",typingSoundVolume)
  • typingSoundVolume: A float of the volume of the typing sound. Range is from 0.0 to 1.0. This can go above 1.0 for amplification.

wordWrap

This property determines the word wrap state of dgs memo. This is equivalent to dgsMemoSetWordWrapState/dgsMemoGetWordWrapState

dgsSetProperty(memo,"wordWrap",wordWrap)
  • wordWarp: An integer or a bool of word wrap state, vaild state are as follows:
    • false: Non-wordwrap
    • 1: Split via single character ( This will break a word into 2 parts )
    • 2: Split via word

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins