mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
Add raw character index to bitmap text bounds
This commit is contained in:
parent
a13b79f86e
commit
b271accaf0
2 changed files with 6 additions and 1 deletions
|
@ -384,6 +384,7 @@ var GetBitmapTextSize = function (src, round, updateOrigin, out)
|
||||||
|
|
||||||
characters.push({
|
characters.push({
|
||||||
i: charIndex,
|
i: charIndex,
|
||||||
|
idx: i,
|
||||||
char: text[i],
|
char: text[i],
|
||||||
code: charCode,
|
code: charCode,
|
||||||
x: (glyph.xOffset + x) * scale,
|
x: (glyph.xOffset + x) * scale,
|
||||||
|
|
6
types/phaser.d.ts
vendored
6
types/phaser.d.ts
vendored
|
@ -62295,9 +62295,13 @@ declare namespace Phaser {
|
||||||
*/
|
*/
|
||||||
type BitmapTextCharacter = {
|
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;
|
i: number;
|
||||||
|
/**
|
||||||
|
* The index of this character within the BitmapText text string.
|
||||||
|
*/
|
||||||
|
idx: number;
|
||||||
/**
|
/**
|
||||||
* The character.
|
* The character.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue