Allegro.cc
Projects
Resource Directory |
Text Input
Source Directory
» Code Gallery
» Text Input
- Author:
- Chris Barry
- Version:
-
- URL:
- http://www.allegro.cc/resource/code/text-input.php
A common request in the Allegro forums is for a way to process player text input. cin doesn't work. The Allegro GUI does, but is simplistic and limiting (*cough* and ugly *cough*). Back when I wrote an article on the standard C++ string class, I wrote a small C++ program that stored player input in a std::string. Since then, I made a simpler C version that uses a char array. The code is very short and simple to use, so modifying it for your purposes (to word wrap, for example, if you want that) is dirt easy. I get asked for it often, so I'm just submitting it for ease of finding.
|
Poll
Is grammer and spelling important? |
No weigh! |
14.55 |
|
Absilootly, Yes. |
62.53 |
|
I'm a looser with no onion. |
22.92 |
|
|