Howdy.
I'm looking to make a simple sprite font text editor, starting with Dop2000's "Old Terminal Typing" example. I want the user to be able to edit and scroll through pages of sprintfont text.
It should have the feature where the user taps on the screen somewhere to place the cursor in that part of the spritefont text, so that subsequent typing that can begin from that position.
Spritefonts don't seem conscious of where their individual characters are on the screen, so it's seeming like I would want to create a separate spritefont object for each character.. And, each character would have a property of line and character number. Then, clicking that sprite font would move the cursor there (and the string and/or array that is holding all of the cursor text would have to be updated to show where the cursor now is). That might be a pain for managing character spacing and and font-change features, though.
I could use one spritefont object and build some sort of array that keeps track of the x,y position of each character.. Based upon individual character spacing.. But that may be more difficult to manage.
I'm curious if anyone else has some theories on how this would do down.
I guess it would be much easier if it only supported fixed width fonts. Maybe I'll just roll with that first.
I'd also like to use the native phone keyboard, which I believe means that I need a text input box. Right now, I'm just using a small white text box as a button that invokes the native mobile keyboard.
Thanks for any ideas. -Steve