HorizontalAlignment
Defines local horizontal alignment types for text typesetting, which refers to the horizontal alignment relative to the writing direction.
| Type | Name | Interface Description |
|---|---|---|
| Enum | Center | • Function: Center horizontally. |
| Enum | Flush | • Function: Justifies text to fill the container width. |
| Enum | Left | • Function: Align to left edge. |
| Enum | Right | • Function: Align to right edge. |
Examples
Center
let value = APJS.HorizontalAlignment.Center;
Flush
let value = APJS.HorizontalAlignment.Flush;
Left
let value = APJS.HorizontalAlignment.Left;
Right
let value = APJS.HorizontalAlignment.Right;
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use HorizontalAlignment here
}
onUpdate(deltaTime: number) {
}
}