Class ccs.Layout

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for ccs.Layout

Method Summary

Class Detail

ccs.Layout()
Base class for ccs.Layout

Method Detail

  • addBackGroundImage()
    init background image renderer.
  • addChild(locChild, zOrder, tag)
    Adds a locChild to the container.
    Parameters:
    {ccs.Widget} locChild
    {Number} zOrder
    {Number} tag
  • <static> {ccs.Layout} ccs.Layout.create()
    allocates and initializes a UILayout.
    // example
    var uiLayout = ccs.Layout.create();
    Returns:
    {ccs.Layout}
  • {cc.Size} getBackGroundImageTextureSize()
    Gets background image texture size.
    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.
  • requestDoLayout()
    request do layout
  • setBackGroundColor(color, endColor)
    Sets background color for layout, if color type is LAYOUT_COLOR_SOLID
    Parameters:
    {cc.c3b} color
    {cc.c3b} endColor
  • 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
  • setClippingType(type)
    set clipping type
    Parameters:
    {ccs.LayoutClippingType} type
  • setLayoutType(type)
    Sets LayoutType.
    Parameters:
    {ccs.LayoutType} type