Responsive text dialog?

Hey all,

I’m working on a responsive game in Phaser 3 at the moment, and I’m trying to work out a way to create a responsive text box. You know the kind from old Pokemon and Zelda games, but instead of having a fixed width it would be fluid / responsive.

The box would have a responsive width but a fixed height, the idea being if the string displayed was too long, it would display an arrow or something and the dialog would continue on another page.

Has anyone built anything similar to this?

Cheers in advanced :beers:

I detected the height of the canvas text object. This is accessed with text.height.