well, folks. Today, my stupid question will be:
Ok. What i am aiming to do is to have a box drawn on the screen, that shows a whole heap of text lines. These lines would be colored and stored in some object( a string for the text, vector for the colors ), which the strongbox would hold an array/vector of pointers to. I can also hopefully make it resizable/positionable myself - i already did it with my TextBox class.
I already have a draw class that handles cursor positioning, textcolor and the box.
Think the mesage boxes off say, baldurs or NWN or anything......
My problems are fourfold.
a) How to make the lines 'push' each other off the screen. I was thinking reassign the values of each element in the array, but thought that was grossly inefficient. Also, should i make the objects using new/delete or just normal?
b)Wraparound. Not so much making the line wrap around or hyphenate, but compensating for the extra lines used.
c)Coloring the text. Another efficiency problem - i COULD reset the color before every char, but thats just wrong.
d)Telling the computer when to stop..... when i made my textbox, it wrote all the stuff in adjoining memory to the screen, and i dont know how to stop it. Would using a unusual char (like say, the double s thingy at ASCII (31) ) and then testing for it work?
Schiezer. Hope you all have the patience to read and answer this... props to you if you do.
rememberance day today as well - 11-11, 11:00 AM (WWI armistice)