Module flower.widget.TextBox
It is a class that displays the text.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
Fields
STYLE_FONT_NAME | Style: fontName |
STYLE_TEXT_SIZE | Style: textSize |
STYLE_TEXT_COLOR | Style: textColor |
STYLE_TEXT_ALIGN | Style: textSize |
STYLE_TEXT_PADDING | Style: textPadding |
Functions
- TextBox:_initInternal ()
- Initialize a variables
- TextBox:_createChildren ()
- Create a children object.
- TextBox:_updateTextLabel ()
- Update the TextLabel.
- TextBox:updateDisplay ()
- Update the display objects.
- TextBox:setText (text)
-
Sets the text.
Parameters:
- text text
- TextBox:addText (text)
-
Adds the text.
Parameters:
- text text
- TextBox:getText ()
-
Returns the text.
Returns:
-
text
- TextBox:getTextLength ()
-
Returns the text length.
Returns:
-
text length
- TextBox:setTextSize (textSize)
-
Sets the textSize.
Parameters:
- textSize textSize
- TextBox:getTextSize ()
-
Returns the textSize.
Returns:
-
textSize
- TextBox:setFontName (fontName)
-
Sets the fontName.
Parameters:
- fontName fontName
- TextBox:getFontName ()
-
Returns the font name.
Returns:
-
font name
- TextBox:getFont ()
-
Returns the font.
Returns:
-
font
- TextBox:setTextAlign (horizontalAlign, verticalAlign)
-
Sets the text align.
Parameters:
- horizontalAlign horizontal align(left, center, top)
- verticalAlign vertical align(top, center, bottom)
- TextBox:getTextAlign ()
-
Returns the text align.
Returns:
- horizontal align(left, center, top)
- vertical align(top, center, bottom)
- TextBox:getAlignment ()
-
Returns the text align for MOAITextBox.
Returns:
- horizontal align
- vertical align
- TextBox:setTextColor (red, green, blue, alpha)
-
Sets the text align.
Parameters:
- red red(0 ... 1)
- green green(0 ... 1)
- blue blue(0 ... 1)
- alpha alpha(0 ... 1)
- TextBox:getTextColor ()
-
Returns the text color.
Returns:
- red(0 ... 1)
- green(0 ... 1)
- blue(0 ... 1)
- alpha(0 ... 1)
- TextBox:setTextPadding (left, top, right, bottom)
-
Set textbox padding by label's setRect method, it will set 4 direction padding
Parameters:
- left padding for left
- top padding for top
- right padding for right
- bottom padding for bottom
- TextBox:getTextPadding ()
-
Returns the text padding.
Returns:
- padding for left
- padding for top
- padding for right
- padding for bottom