Module flower.widget.UILabel

It is a class that displays the text.

Extends:

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

UILabel:_initInternal () Initialize a variables
UILabel:_createChildren () Create a children object.
UILabel:_updateLabel () Update the UILabel.
UILabel:_updateLabelSize () Update the UILabel size.
UILabel:updateDisplay () Update the display objects.
UILabel:fitSize (length, maxWidth, maxHeight, padding) Sets the fit size.
UILabel:fitHeight (length, maxHeight, padding) Sets the fit height.
UILabel:fitWidth (length, maxWidth, padding) Sets the fit height.
UILabel:getLabel () Return the label.
UILabel:setText (text) Sets the text.
UILabel:addText (text) Adds the text.
UILabel:getText () Returns the text.
UILabel:setTextResizePolicy (widthPolicy, heightPolicy) Sets the size policy of label.
UILabel:getTextResizePolicy () Returns the size policy of label.
UILabel:setTextSize (textSize) Sets the textSize.
UILabel:getTextSize () Returns the textSize.
UILabel:setFontName (fontName) Sets the fontName.
UILabel:getFontName () Returns the font name.
UILabel:getFont () Returns the font.
UILabel:setTextAlign (horizontalAlign, verticalAlign) Sets the text align.
UILabel:getTextAlign () Returns the text align.
UILabel:getAlignment () Returns the text align for MOAITextBox.
UILabel:setTextColor (red, green, blue, alpha) Sets the text align.
UILabel:getTextColor () Returns the text color.
UILabel:setTextPadding (left, top, right, bottom) Set textbox padding by label's setRect method, it will set 4 direction padding
UILabel: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
STYLE_TEXT_RESIZE_POLICY Style: textResizePolicy
RESIZE_POLICY_NONE textResizePolicy : none
RESIZE_POLICY_AUTO textResizePolicy : auto


Functions

UILabel:_initInternal ()
Initialize a variables
UILabel:_createChildren ()
Create a children object.
UILabel:_updateLabel ()
Update the UILabel.
UILabel:_updateLabelSize ()
Update the UILabel size.
UILabel:updateDisplay ()
Update the display objects.
UILabel:fitSize (length, maxWidth, maxHeight, padding)
Sets the fit size.

Parameters:

  • length (Option)Length of the text.
  • maxWidth (Option)maxWidth of the text.
  • maxHeight (Option)maxHeight of the text.
  • padding (Option)padding of the text.
UILabel:fitHeight (length, maxHeight, padding)
Sets the fit height.

Parameters:

  • length (Option)Length of the text.
  • maxHeight (Option)maxHeight of the text.
  • padding (Option)padding of the text.
UILabel:fitWidth (length, maxWidth, padding)
Sets the fit height.

Parameters:

  • length (Option)Length of the text.
  • maxWidth (Option)maxWidth of the text.
  • padding (Option)padding of the text.
UILabel:getLabel ()
Return the label.

Returns:

    label
UILabel:setText (text)
Sets the text.

Parameters:

  • text text
UILabel:addText (text)
Adds the text.

Parameters:

  • text text
UILabel:getText ()
Returns the text.

Returns:

    text
UILabel:setTextResizePolicy (widthPolicy, heightPolicy)
Sets the size policy of label.

Parameters:

  • widthPolicy width policy
  • heightPolicy height policy
UILabel:getTextResizePolicy ()
Returns the size policy of label.

Returns:

  1. width policy
  2. height policy
UILabel:setTextSize (textSize)
Sets the textSize.

Parameters:

  • textSize textSize
UILabel:getTextSize ()
Returns the textSize.

Returns:

    textSize
UILabel:setFontName (fontName)
Sets the fontName.

Parameters:

  • fontName fontName
UILabel:getFontName ()
Returns the font name.

Returns:

    font name
UILabel:getFont ()
Returns the font.

Returns:

    font
UILabel:setTextAlign (horizontalAlign, verticalAlign)
Sets the text align.

Parameters:

  • horizontalAlign horizontal align(left, center, top)
  • verticalAlign vertical align(top, center, bottom)
UILabel:getTextAlign ()
Returns the text align.

Returns:

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

Returns:

  1. horizontal align
  2. vertical align
UILabel: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)
UILabel:getTextColor ()
Returns the text color.

Returns:

  1. red(0 ... 1)
  2. green(0 ... 1)
  3. blue(0 ... 1)
  4. alpha(0 ... 1)
UILabel: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
UILabel: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
STYLE_TEXT_RESIZE_POLICY
Style: textResizePolicy
RESIZE_POLICY_NONE
textResizePolicy : none
RESIZE_POLICY_AUTO
textResizePolicy : auto
generated by LDoc 1.3