Sorry I'm a bit new to libgdx (really liking it so far!), so might be a bit starter question
I am implementing a dialogue box class for my RPG game. Basically I am having it display character by character like you see in Final Fantasy games when people are talking. I got it working really well with word wrapping by using the BitmapFontCache class. My next step is to implement "paging". (i.e You pass a string to the dialogue class to display and it determines what parts of the string can fit in each page of dialogue). I'm having a bit of trouble with this without resorting to calculating my own word wrapping.
Is there a function that I can pass the constraints of my dialogue box (say a rectangle) and get back the portion of the string that would fit in that constraint? (taking into account word wrapping + end lines and the like). I can loop through character by character and use getWrappedBounds (and then stop once it goes over my constraint height) but I feel like I would still need to account for word wrapping when getting the string portion.
Any ideas?