Hallo gem-devs!
I currently need to display formated text in GEM: I use text2d and need to display a longer text over more lines - so I have to check where I have to make a newline ...
I know I can implement that with the pd message system, but it's a little bit hacky and not so dynamic.
So I thought about implementing it directly in the TextBase class:
e.g.: ////////// // The string to display char **m_theString; ////////// // max. characters pro lines // (if 0 then there will be only 1 line // with as much characters as needed!) int m_maxchar; ////////// // lines of the string int m_lines;
with changing m_theString to a double pointer and m_maxchar is the maximum of characters in one line - so I can automatically calculate the nr of lines (m_lines) and display the text dynamically in more lines - and of course if a word doesn't fit into the line anymore it will be put in the next line...
So my question, would that be usefull ? (because it's a little bit of work - I would have to modify all the different text objects ...) If not I will simply use a hack, which also would do the job, but maybe this solution could be usefull ... let me know what you think ...
Thanks, LG Georg