Add raw character index to bitmap text bounds

This commit is contained in:
Jaro Vanderheijden 2022-08-20 12:29:47 +02:00
parent a13b79f86e
commit b271accaf0
2 changed files with 6 additions and 1 deletions

View file

@ -384,6 +384,7 @@ var GetBitmapTextSize = function (src, round, updateOrigin, out)
characters.push({
i: charIndex,
idx: i,
char: text[i],
code: charCode,
x: (glyph.xOffset + x) * scale,

6
types/phaser.d.ts vendored
View file

@ -62295,9 +62295,13 @@ declare namespace Phaser {
*/
type BitmapTextCharacter = {
/**
* The index of this character within the BitmapText text string.
* The index of this character within the BitmapText wrapped text string.
*/
i: number;
/**
* The index of this character within the BitmapText text string.
*/
idx: number;
/**
* The character.
*/