Anyone know how I can add text to an edit box and put what is already in the edit box on a new line? In other words, inserting a line break into the edit box. I heard about some things for MMF, but what about TGF?
Yes, but the problem is finding the character that represents that new line. There is no "newline$" in TGF - what you could do is have a separate Edit object, or a string I suppose... (let's call it Newline Object for now) that contains only a new line (Enter) character, and use this on your Edit Object:
Set text of Edit Object to ("Here's some new text" + Gettext$("Newline Object") + Gettext$("Edit Object"))
Of course, there may be a far simpler way if there is another way of representing a newline character in TGF - but I don't know of one.
Well, actually it didn't work. But I did figure out how to do it... sort of.
I took an edit object, like Wong said, and told TGF to always set text of edit object to appdrive$ + appdir$ + "Game Files\carriage return.txt"
then I made the file itself, and put this into the file: (carriage return)...
so, combined with my game, it produces this effect:
Johnny Tatlock uses Greek Fire Grenade!
...Johnny Tatlock's turn.
...Johnny Tatlock is hit with 4 damage points!
...Urban the Flea uses Sauce!
...
where the line without the ... is the newest one. I tried just putting a return into the text file, but TGF displayed that as "||". Oh well. Thanks for the idea Wong!
It'd be better just to press return in a string object on the frame. If someone edited or deleted your "carriage return.txt" file your app would stuff up.