Input string

Blitz3D Forums/Blitz3D Beginners Area/Input string

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

For a lot of info, you'll need to write your own input routine, using Keyhit to see which key has been hit, then Printing it yourself, going to another line as needed. And you'll also need to trap Backspace and Delete to delete what's been input and trap Enter to know when input is over. The Locate command will be your best friend during all this. It's certainly do-able, but a bit dull to code.

An alternative is to use a GUI (like Yappy's Xlnt GUI) or else use BlitzPlus (which I assume has a TextBox-type object like Visual Basic does).

The thing is, Blitz3D (like the old Blitz2D) is aimed at doing game-type stuff, and typing in a paragraph is a rare feature in most games. You can still do it, it just takes a little work. This is the opposite of "business app" languages like Visual Basic, which are *built* to do things like accept many paragraphs of input with a handy TextBox object (or even a rich-text editor, complete with font changes), but which *suck* at creating games. :)

My quick visit to the Blitzbasic.com code archives didn't turn up a suitable function (though I might have missed it), and Blitzcoder.com is still in the process of moving, so I can't check there. If I'd ever written what you describe, I'd be glad to share it, but I haven't. So, you could write your own, or maybe someone else has a coded a robust paragraph hander before... Anyone? Bueller? Anyone? :)