Class ccs.UILayer

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

Method Summary

Class Detail

ccs.UILayer()
Base class for ccs.UILayer

Method Detail

  • addWidget(widget)
    add widget
    Parameters:
    {ccs.Widget} widget
  • {boolean} checkEventWidget(touch, event)
    Finds a widget which is selected and call it's "onTouchBegan" method.
    Parameters:
    {cc.Touch} touch
    {event} event
    Returns:
    {boolean}
  • {boolean} checkTouchEvent(root, touch, event)
    Check touch event
    Parameters:
    {ccs.Widget} root
    {cc.Touch} touch
    {event} event
    Returns:
    {boolean}
  • clear()
    remove all children
  • <static> {ccs.UILayer} ccs.UILayer.create()
    allocates and initializes a UILayer.
    // example
    var uiLayer = ccs.UILayer.create();
    Returns:
    {ccs.UILayer}
  • {ccs.UIInputManager} getInputManager()
    get inputManager
    Returns:
    {ccs.UIInputManager}
  • {ccs.Widget} getRootWidget()
    get root widget
    Returns:
    {ccs.Widget}
  • {ccs.Widget} getWidgetByName(name)
    get widget by name
    Parameters:
    name
    Returns:
    {ccs.Widget}
  • {ccs.Widget} getWidgetByTag(tag)
    get widget by tag
    Parameters:
    {Number} tag
    Returns:
    {ccs.Widget}
  • removeWidget(widget)
    remove widget
    Parameters:
    {ccs.Widget} widget