Class ccs.UILayout
- Defined in: UILayout.js
- Extends ccs.UIWidget
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for ccs.UILayout
|
Method Summary
Class Detail
ccs.UILayout()
Base class for ccs.UILayout
Method Detail
-
addBackGroundImage()init background image renderer.
-
{boolean} addChild(locChild)Adds a locChild to the container.
- Parameters:
- {ccs.UIWidget} locChild
- Returns:
- {boolean}
-
allocates and initializes a UILayout.
// example var uiLayout = ccs.UILayout.create();
- Returns:
- {ccs.UILayout}
-
{cc.Size} getBackGroundImageTextureSize()Gets background image texture size.
- Returns:
- {cc.Size}
-
{cc.Size} getContentSize()Gets the content size of widget.
- Returns:
- {cc.Size}
-
{string} getDescription()Returns the "class name" of widget.
- Returns:
- {string}
-
{null} getLayoutType()Gets LayoutType.
- Returns:
- {null}
-
{Boolean} isClippingEnabled()Gets if layout is clipping enabled.
- Returns:
- {Boolean}
-
removeBackGroundImage()Remove the background image of layout.
-
setBackGroundColor(color, endColor)Sets background color for layout, if color type is LAYOUT_COLOR_SOLID
-
setBackGroundColorOpacity(opacity)Sets background opacity layout.
- Parameters:
- {number} opacity
-
setBackGroundColorType(type)Sets Color Type for layout.
- Parameters:
- {ccs.LayoutBackGroundColorType} type
-
setBackGroundColorVector(vector)Sets background color vector for layout, if color type is LAYOUT_COLOR_GRADIENT
- Parameters:
- {cc.Point} vector
-
setBackGroundImage(fileName, texType)Sets a background image for layout
- Parameters:
- {String} fileName
- {ccs.TextureResType} texType
-
setBackGroundImageCapInsets(capInsets)Sets a background image capinsets for layout, if the background image is a scale9 render.
- Parameters:
- {cc.Rect} capInsets
-
setBackGroundImageScale9Enabled(able)Sets background iamge use scale9 renderer.
- Parameters:
- {Boolean} able
-
setClippingEnabled(able)Changes if layout can clip it's content and locChild.
- Parameters:
- {Boolean} able
-
setColor(color)Sets background color
- Parameters:
- {cc.c3b} color
-
setLayoutType(type)Sets LayoutType.
- Parameters:
- {ccs.LayoutType} type
-
setOpacity(opacity)Sets background opacity
- Parameters:
- {number} opacity