new Panel()
A flat color rectangle that can be used to display UI elements. This is a UI component, so it should be added to an entity with a UITransform component.
| Name | Type | Default | Description |
|---|---|---|---|
color | Color | Color.white | The color of the panel. |
- Source
Example
// Create a new entity with a UITransform component and a Panel component.
let entity = new Entity();
entity.AddComponent(new UITransform());
entity.AddComponent(new Panel(Color.white));Extends
Members
blendMode
Blend mode of the object
- Inherited From
- Source
color :Color
The color of the panel.
Type:
- Source
filter
The filter applied to the object
- Inherited From
- Source
(readonly) properties
The entity that this component is attached to.
- Inherited From
- Source
Methods
deserialize(props)
Populates the component properties from a data object. Override this method for custom property handling.
Parameters:
| Name | Type | Description |
|---|---|---|
props | object | The properties object (usually from JSON). |
- Inherited From
- Source
drawChildren()
Draw this entity's nested renderables in deterministic order. @protected
- Inherited From
- Source