setFixedWidth(width, lineAlignment)
If you need this RetroFont to have a fixed width and custom alignment you can set the width here.
If text is wider than the width specified it will be cropped off.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
width | number | Width in pixels of this RetroFont. Set to zero to disable and re-enable automatic resizing. | ||
lineAlignment | string | <optional> | 'left' | Align the text within this width. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER. |
- Source code: gameobjects/RetroFont.js (Line 275)
Please login to continue.