new GOWN.LayoutGroup(layout, maxWidth, maxHeight)
The LayoutGroup allows you to add PIXI.js children that will be positioned
| Name | Type | Default | Description |
|---|---|---|---|
layout |
GOWN.LayoutAlignment | The layout for the layout group | |
maxWidth |
Number | Infinity | optional The maximum width of the layout group |
maxHeight |
Number | Infinity | optional The maximum height of the layout group |
Extends
Members
-
enabledBoolean
-
Enables/Disables the control. (not implemented yet)
-
heightNumber
-
The height of the group, will get the position and the height of the bottom child.
-
layoutGOWN.LayoutAlignment
-
The layout for the layout group
-
maxHeightNumber
-
The maximum height of the layout group
- Default Value:
- Infinity
-
maxWidthNumber
-
The maximum width of the layout group
- Default Value:
- Infinity
-
percentHeightNumber
-
The percentage height of the positioned children
-
percentWidthNumber
-
The percentage width of the positioned children
-
widthNumber
-
The width of the group, will get the position and the width of the right child.
Methods
-
addChild(child){PIXI.DisplayObject}
-
Adds one or more children to the container. Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)`
Name Type Description childPIXI.DisplayObject repeatable The DisplayObject(s) to add to the container Returns:
Type Description PIXI.DisplayObject The first child that was added. -
addChildAt(child, index){PIXI.DisplayObject}
-
Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown
Name Type Description childPIXI.DisplayObject The child to add indexnumber The index to place the child in Returns:
Type Description PIXI.DisplayObject The child that was added. -
addSpacer(space)
-
Add some space between children
Name Type Description spaceNumber Space between children -
childIsRenderAble(child, x, y, width, height){boolean}
-
Indicates if the given child is inside the viewport (only used for scrolling)
Name Type Description childPIXI.DisplayObject One child with set coordinates and dimensions xNumber X-position on the scroll-container yNumber Y-position on the scroll-container widthNumber Width of the viewport heightNumber Height of the viewport Returns:
Type Description boolean -
inherited mousePos(){PIXI.Point}
-
Get the local mouse position from PIXI.InteractionData
Returns:
Type Description PIXI.Point -
protectedonResize()
-
onResize callback
-
protectedredraw()
-
Update before draw call (position label) (called from Control.prototype.updateTransform every frame)
-
inherited setTheme(theme)
-
Change the theme (every control can have a theme, even if it does not inherit Skinable, e.g. if there is only some color in the skin that will be taken or if it has some skinable components as children)
Name Type Description themeGOWN.Theme the new theme -
updateRenderable(x, y, width, height)
-
Update renderable (culling of non visible objects)
Name Type Description xNumber X-position on the scroll-container yNumber Y-position on the scroll-container widthNumber width of the viewport heightNumber height of the viewport