I think we should have the ability to change the way text boxes appear.
For one, theres an automatic limit on the length of the textbox depending on the width of the item.
Something like
int TextBox.MaxChar
would make it easier to build more sophisticated save/load screens for example.
Another thing that bothers the hell outta me is the old DOS style underscore that leads the input.
If this could be toggled off, we could write out own system like a blinking vertical line or something.
Anyway, just a few ideas.
Cheers,
Sparky.
QuoteAnother thing that bothers the hell outta me is the old DOS style underscore that leads the input.
Yeah, I had an issue (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=39878.0) with this as well, but Crimson gave me the idea to use a label to show the text in the textbox instead. Pain in the arse, but it did work (haven't fully tested it though cause I've been sorta busy).
From the first time I've noticed System.CapsLock;, I've had the idea Chris Jones was teasing us with the idea of replicating a textbox via a label, as a workaround with all those cases. I've started working on something once, but I got bored, and thought no one would actually find it useful..
Maybe the simplest and most efficient way to solve the cursor problems with AGS TextBoxes would be to simply add a "DrawCursor" boolean to them (just like the "DrawBorder"). Users looking to override the way this cursor looks can then simply retrieve whatever is in the box at any time, get the width of that input via GetTextWidth ( ) and then draw their own cursor to the interface.
Or a Cursor string value, in which you specify a string that should be appended to the end of TextBox.Text. By default "_" but can also be "-", "|-|" or "".
A TextBox.CursorBlinkSpeed (or whatever to call it) property would also be nice - as it is now I'm faking a lot of my text boxes with DynamicSprites to get a flashing text cursor.
Totally agree with you guys. Some great suggestions there. ;)
Sparky.