new UIElement(renderable, position, size) → {UIElement}
Parent class for all UI Objects
Parameters:
Name | Type | Description |
---|---|---|
renderable |
Texture | The renderable for the UI Object |
position |
Array.<Array> | The pixel position of the element |
size |
Array.<Array> | It's size |
- Source:
Returns:
- Type
- UIElement
Methods
_applyUIXform(aCamera)
Converts the pixel position to a WC position that the camera to use
Parameters:
Name | Type | Description |
---|---|---|
aCamera |
Camera | The camera the the conversion will be based off of |
- Source:
draw(aCamera)
Draws the UIElement to the camera
Parameters:
Name | Type | Description |
---|---|---|
aCamera |
Camera | the camera that the element will be drawed to. |
- Source:
getUIBBox() → {BoundingBox}
Get the BoundingBox of the element
- Source:
Returns:
The BoundingBox of the element
- Type
- BoundingBox
getUIXform() → {Transform}
Get the Transform of the Element
- Source:
Returns:
The Transform of the element
- Type
- Transform
setVisible(visible)
Set's whether the shape will be visible or not
Parameters:
Name | Type | Description |
---|---|---|
visible |
boolean | What the visibility will be set to |
- Source:
update()
Updates the element
- Source: