generalize breakText

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Nox
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

generalize breakText

Post by Nox »

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 :) ).
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

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
CuteAlien
Admin
Posts: 9735
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

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
Nox
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

Post by Nox »

@CuteAlien couldnt you rework the patch to add such a class? Because you allready developed such a method and it will be easy for you to create this class, wont it?
CuteAlien
Admin
Posts: 9735
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

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
Post Reply