Thread: Yet another question

  1. #1
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68

    Renamed : StringBox

    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.

    /RESOLVED/
    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)
    Last edited by littleweseth; 11-11-2003 at 09:19 PM.
    Ph33r the sphericalCUBE

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM