Dgs-dxmemo: Difference between revisions
Line 63: | Line 63: | ||
===cursorStyle=== | ===cursorStyle=== | ||
This is equivalent to [[dgsDxMemoSetCaretStyle]]/[[dgsDxMemoGetCaretStyle]] | |||
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 "_" ) | ||
Revision as of 13:05, 18 November 2017
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 which can be translated by tocolor of the text of the memo.
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)
- font : A dx font element of the text font of the memo.
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.
showLine
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 )
dgsDxGUISetProperty(memo,"showLine",line)
- line : An integer indicates how many lines are moved to top.
cursorStyle
This is equivalent to dgsDxMemoSetCaretStyle/dgsDxMemoGetCaretStyle 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_
dgsDxGUISetProperty(memo,"cursorStyle",cursorStyle)
- cursorStyle : An integer of the caret style of the memo.
cursorThick
This property allows us to change the thickness of caret of the memo.
dgsDxGUISetProperty(memo,"cursorThick",cursorThick)
- cursorThick : An integer of the thickness of the caret of the memo.
scrollBarThick
This property allows us to change the thickness of scroll bars of the memo.
dgsDxGUISetProperty(memo,"scrollBarThick",scrollBarThick)
- scrollBarThick : An integer of the thickness of scroll bars of the memo.
cursorOffset
The offset of the caret of the memo.
dgsDxGUISetProperty(memo,"cursorOffset",{offsetX,offsetY})
- offsetX : A float of the 2D X position offset of the caret of the memo.
- offsetY : A float of the 2D Y position offset of the caret of the memo.
readOnly
This is equivalent to dgsDxMemoSetReadOnly/dgsDxMemoGetReadOnly.
dgsDxGUISetProperty(memo,"readOnly",readOnly)
- readOnly : A bool indicates whether the memo is only readable.
readOnlyCaretShow
Whether use math.floor when calculating position and size of memo.
dgsDxGUISetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)
- readOnlyCaretShow : A bool indicates whether the caret is shown or hidden when the memo is read-only.
side
The border size of the memo.
dgsDxGUISetProperty(memo,"side",side)
- side : A float of the border size of the memo.
sidecolor
The border color which can be translated by tocolor of the memo.
dgsDxGUISetProperty(memo,"sidecolor",sidecolor)
- sidecolor : An integer of the color of the border of the memo.
useFloor
Whether use math.floor when calculating position and size of memo.
dgsDxGUISetProperty(memo,"useFloor",useFloor)
- useFloor : A bool indicates whether to use math.floor when calculating position and size of memo.
selectcolor
The color which can be translated by tocolor of the rectangle of test selection of the memo.
dgsDxGUISetProperty(memo,"selectcolor",selectcolor)
- selectcolor : An integer of the color of the rectangle of test selection of the memo.
memo
This property stores a gui-memo which is used to input characters.
dgsDxGUISetProperty(memo,"memo",gmemo)
- gmemo : A gui-memo.
renderTarget
This property stores a render target of the memo.
dgsDxGUISetProperty(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 dgsDxMemoGetScrollBar of the memo.
dgsDxGUISetProperty(memo,"scrollbars",{Vertical,Horizontal})
- Vertical : A vertical scroll bar of the memo.
- Horizontal : A horizontal scroll bar of the memo.