Alphabet
| Kind | class |
| Package | objects |
| Full name | objects.Alphabet |
| Source | source/objects/Alphabet.hx |
| Extends | FlxSpriteGroup |
Known subclasses: AttachedText, TypedAlphabet
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
text | String | no | — | property (default, set) |
bold | Bool | no | false | — |
letters | Array<AlphaCharacter> | no | [] | — |
isMenuItem | Bool | no | false | — |
targetY | Int | no | 0 | — |
changeX | Bool | no | true | — |
changeY | Bool | no | true | — |
alignment | Alignment | no | LEFT | property (default, set) |
scaleX | Float | no | 1 | property (default, set) |
scaleY | Float | no | 1 | property (default, set) |
rows | Int | no | 0 | — |
distancePerItem | FlxPoint | no | new FlxPoint(20, 120) | — |
startPosition | FlxPoint | no | new FlxPoint(0, 0) | — |
Public methods
new (constructor)
function new(x:Float, y:Float, text:String = "", bold:Bool = true)
| Parameter | Type | Default |
|---|---|---|
x | Float | — |
y | Float | — |
text (optional) | String | "" |
bold (optional) | Bool | true |
setAlignmentFromString
function setAlignmentFromString(align:String)
| Parameter | Type | Default |
|---|---|---|
align | String | — |
clearLetters
function clearLetters()
setScale
function setScale(newX:Float, newY:Null<Float> = null)
| Parameter | Type | Default |
|---|---|---|
newX | Float | — |
newY (optional) | Null<Float> | null |
softReloadLetters
function softReloadLetters(ratioX:Float = 1, ratioY:Null<Float> = null)
| Parameter | Type | Default |
|---|---|---|
ratioX (optional) | Float | 1 |
ratioY (optional) | Null<Float> | null |
snapToPosition
function snapToPosition()
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
Y_PER_ROW | Float | yes |
| Method |
|---|
function set_alignment(align:Alignment) |
function updateAlignment() |
function set_text(newText:String) |
function set_scaleX(value:Float) |
function set_scaleY(value:Float) |
override function update(elapsed:Float) |
function createLetters(newText:String) |