It would be a greate deal to generalize breakText because it is used in CGUIEditBox, CGUITable and CGUIStaticText. If it were generalized it would be easy to insert multiline in CTextSceneNode too.
May be creating a class or just a function like "String breakText(String in, s32 maxlinelength)" would make this ease to use. If a patch is needed i may be could create one (if you promise to adopt it to the next release ).
generalize breakText
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
We're always open to evaluating patches on their merits.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
I remember I discussed this one already once or twice in the chat with Bitplane. So yeah - it's certainly a good idea. I've even written once a function which did already go some way in that direction as part of another patch (http://www.michaelzeilfelder.de/irrlich ... wrap.patch). The breakText in there is already working with parameters and not with members to split it more from the guielement. But I think it should probably be an own class (CTextSplitter or something like that).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Sure, I think I might find some time for that around x-mas 2011 :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm