Module flower.widget.TextBox

It is a class that displays the text.

Extends:

Info:

  • Release: V3.0.0
  • Author: Makoto

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.
TextBox:addText (text) Adds the text.
TextBox:getText () Returns the text.
TextBox:getTextLength () Returns the text length.
TextBox:setTextSize (textSize) Sets the textSize.
TextBox:getTextSize () Returns the textSize.
TextBox:setFontName (fontName) Sets the fontName.
TextBox:getFontName () Returns the font name.
TextBox:getFont () Returns the font.
TextBox:setTextAlign (horizontalAlign, verticalAlign) Sets the text align.
TextBox:getTextAlign () Returns the text align.
TextBox:getAlignment () Returns the text align for MOAITextBox.
TextBox:setTextColor (red, green, blue, alpha) Sets the text align.
TextBox:getTextColor () Returns the text color.
TextBox:setTextPadding (left, top, right, bottom) Set textbox padding by label's setRect method, it will set 4 direction padding
TextBox:getTextPadding () Returns the text padding.

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:

  1. horizontal align(left, center, top)
  2. vertical align(top, center, bottom)
TextBox:getAlignment ()
Returns the text align for MOAITextBox.

Returns:

  1. horizontal align
  2. 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:

  1. red(0 ... 1)
  2. green(0 ... 1)
  3. blue(0 ... 1)
  4. 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:

  1. padding for left
  2. padding for top
  3. padding for right
  4. padding for bottom

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
generated by LDoc 1.3