new UiContainer(game) → {void}
Parameters:
Name | Type | Description |
---|---|---|
game |
BGE.Game |
Properties:
Name | Type | Description |
---|---|---|
backgroundRGBA |
integer |
RGBA value for the background of the window/container |
showBackground |
boolean |
RGBA value for the background of the window/container |
children |
object |
- Source:
Extends
- UiWidget
Methods
addChild(element) → {void}
Parameters:
Name | Type | Description |
---|---|---|
element |
UiWidget |
- Source:
clearChildren() → {void}
- Source:
draw() → {void}
Method called each frame to draw any images of this entity
- Source:
getValue() → {object}
Function to get the value of the UIContainer, which will be an object of all the values of the children
- Source:
onAudioEvent(msg) → {void}
Method to handle audio events
Parameters:
Name | Type | Description |
---|---|---|
msg |
object |
roAudioPlayerEvent |
- Source:
- See:
onChangeRoom(newRoom) → {void}
Method called when the current room changes.
This method is only called when the entity is marked as persistant
,
otherwise entities are destroyed on room changes.
Calls same method in all children
Parameters:
Name | Type | Description |
---|---|---|
newRoom |
Room |
The next room |
- Source:
onDestroy() → {void}
Method called when this entity is destroyed
- Source:
onECPInput(data) → {void}
Method to process an External Control Protocol event
Parameters:
Name | Type | Description |
---|---|---|
data |
object |
- Source:
- See:
onECPKeyboard(char) → {void}
Method to process an ECP keyboard event
Parameters:
Name | Type | Description |
---|---|---|
char |
integer |
- Source:
- See:
onGameEvent(eventName, data) → {void}
General purpose event handler for in-game events. Calls same method in all children
Parameters:
Name | Type | Description |
---|---|---|
eventName |
string |
Event name that describes the event type |
data |
object |
Any extra data to go along with the event |
- Source:
onInput(input) → {void}
Method to process input per frame Calls same method in all children
Parameters:
Name | Type | Description |
---|---|---|
input |
BGE.GameInput |
GameInput object for the last frame |
- Source:
onPause() → {void}
Called when the game pauses Calls same method in all children
- Source:
onRemove() → {void}
Method for handling any actions needed when this is removed from view Clears all children
- Source:
onResume(pauseTimeMs) → {void}
Called when the game unpauses Calls same method in all children
Parameters:
Name | Type | Description |
---|---|---|
pauseTimeMs |
integer |
The number of milliseconds the game was paused |
- Source:
onUpdate(deltaTime) → {void}
Method for handling any updates based on time since previous frame Calls same method in all children
Parameters:
Name | Type | Description |
---|---|---|
deltaTime |
float |
milliseconds since last frame |
- Source:
onUrlEvent(msg) → {void}
Called on url event
Parameters:
Name | Type | Description |
---|---|---|
msg |
object |
roUrlEvent |
- Source:
- See:
removeChild(element) → {void}
Parameters:
Name | Type | Description |
---|---|---|
element |
UiWidget |
- Source:
setCanvas(canvasopt) → {void}
Set the canvas this UIWidget Draws to Sets the canvas on all children
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
canvas |
object |
<optional> |
invalid |
The canvas this should draw to - if invalid, then will draw to the game canvas |
- Source: