File hp/display/Group.lua

Functions

M:addChild (child, Child) Add a child object.
M:copyParams (params) Set the parameter setter function.
M:getBounds () Returns the bounds of the object.
M:getChildAt (i) Returns the childr object.
M:getChildren () Returns the children object.
M:getHeight () Returns the height.
M:getWidth () Returns the width.
M:hitTestScreen (screenX, screenY, screenZ) If the object will collide with the screen, it returns true.
M:hitTestWorld (worldX, worldY, worldZ) If the object will collide with the world, it returns true.
M:init (params) The constructor.
M:isGroup () Returns true if the group.
Are used in internal decision.
M:removeChild (child, Child) Remove the child object.
M:removeChildren () Remove the children object.
M:resizeForChildren () Resize based on the location and size of the child elements.
M:setCenterPiv () Set the center of the pivot.
M:setLayer (layer) Set the layer of the same for children.
M:setSize (width, height) Sets the width and height.
M:setVisible (visible) Set the visible.

Tables

Group This is a class to grouping the DisplayObject.


Functions

M:addChild (child, Child)
Add a child object.
The child object to duplicate is not added.
If you have set the Layer to the group, the layer is set to the child.

Parameters

  • child:
  • Child: to inherit the MOAIProp.
M:copyParams (params)
Set the parameter setter function.

Parameters

  • params: Parameter is set to Object.
M:getBounds ()
Returns the bounds of the object.

Return value:

xMin, yMin, zMin, xMax, yMax, zMax
M:getChildAt (i)
Returns the childr object.

Parameters

  • i: Index.

Return value:

child
M:getChildren ()
Returns the children object. If you want to use this function with caution.
direct manipulation table against children are not reflected in the Group.

Return value:

children
M:getHeight ()
Returns the height.

Return value:

height
M:getWidth ()
Returns the width.

Return value:

width
M:hitTestScreen (screenX, screenY, screenZ)
If the object will collide with the screen, it returns true.

Parameters

  • screenX: x of screen
  • screenY: y of screen
  • screenZ: (option)z of screen

Return value:

If the object is a true conflict
M:hitTestWorld (worldX, worldY, worldZ)
If the object will collide with the world, it returns true.

Parameters

  • worldX: world x of layer
  • worldY: world y of layer
  • worldZ: (option)world z of layer

Return value:

If the object is a true conflict
M:init (params)
The constructor.

Parameters

  • params: (option)Parameter is set to Object.
M:isGroup ()
Returns true if the group.
Are used in internal decision.
M:removeChild (child, Child)
Remove the child object.
If you have set the Layer to the group, layer of the child is removed.

Parameters

  • child:
  • Child: to inherit the MOAIProp.
M:removeChildren ()
Remove the children object.
M:resizeForChildren ()
Resize based on the location and size of the child elements.
M:setCenterPiv ()
Set the center of the pivot.
M:setLayer (layer)
Set the layer of the same for children.

Parameters

  • layer: MOAILayer instance.
M:setSize (width, height)
Sets the width and height.

Parameters

  • width: width
  • height: height
M:setVisible (visible)
Set the visible.

Parameters

  • visible: visible

Tables

Group
This is a class to grouping the DisplayObject.
Will be used as a dummy MOAIProp.
Base Classes => DisplayObject, Resizable

Valid XHTML 1.0!