Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: subspark on Sun 14/02/2010 01:14:02

Title: [SUGGESTION] Improving TextBoxes
Post by: subspark on Sun 14/02/2010 01:14:02
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.
Title: Re: [SUGGESTION] Improving TextBoxes
Post by: Ryan Timothy B on Sun 14/02/2010 01:59:02
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).
Title: Re: [SUGGESTION] Improving TextBoxes
Post by: Dualnames on Sun 14/02/2010 02:57:04
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..
Title: Re: [SUGGESTION] Improving TextBoxes
Post by: DoorKnobHandle on Sun 14/02/2010 03:25:22
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.
Title: Re: [SUGGESTION] Improving TextBoxes
Post by: Lt. Smash on Sun 14/02/2010 14:07:07
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 "".
Title: Re: [SUGGESTION] Improving TextBoxes
Post by: GarageGothic on Sun 14/02/2010 15:46:19
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.
Title: Re: [SUGGESTION] Improving TextBoxes
Post by: subspark on Wed 17/02/2010 08:30:59
Totally agree with you guys. Some great suggestions there. ;)

Sparky.