mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-12 19:32:17 +02:00
Add getWrappedText to mockText
This commit is contained in:
parent
ff825605b1
commit
97ecb17637
@ -308,5 +308,14 @@ export default class MockText implements MockGameObject {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the word wrap algorithm on the text, then returns an array of the lines
|
||||
*/
|
||||
getWrappedText() {
|
||||
// Returns the wrapped text.
|
||||
// return this.phaserText.getWrappedText();
|
||||
return this.runWordWrap(this.text).split("\n");
|
||||
}
|
||||
|
||||
on(_event: string | symbol, _fn: Function, _context?: any) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user