SUGGESTION: Disable textbox cursor (IMPLEMENTED)

Started by Ubel, Fri 26/05/2006 12:55:55

Previous topic - Next topic

Ubel

I feel a bit bad about posting this, because it's such a small thing but I would find it very useful. Could there be a function like Textbox.DisableCursor() and .EnableCursor() added in AGS?

For me this would be important because I have many textboxes in the same GUI and only one of them is enabled at a time. It would be nice to have the cursors disabled from those textboxes that are not enabled.

Also if someone knows a good workaround for this, please share. :) I tried changing the font to the same font that doesn't have the cursor character in it but for some reason the cursor still appears in the box, so I know that won't work.

SSH

Indeed. Well, I think the cursor shoudl disable automatically if the textbox or its owning gui is disabled.
12

GarageGothic

#2
How about using labels instead of text boxes and using on_key_press to add to a string displayed on the label? Then you could control whether the cursor character should be added to the end or not. I'm doing something similar for search boxes in my game, except I'm using RawDraw instead of labels.

Ubel

Quote from: GarageGothic on Fri 26/05/2006 13:34:04
How about using labels instead of text boxes and using on_key_press to add to a string displayed on the label?

I thought of using labels too, and I'm sure I wouldn't have much trouble making it like that, but it would still become sooo complicated. :P

Quote from: SSH on Fri 26/05/2006 13:23:30
Well, I think the cursor shoudl disable automatically if the textbox or its owning gui is disabled.

Ah yes, that's a good idea.

Ashen

As a workaround, what if when you disable the TextBox you also make it invisible, and replace it with a label to display the text?

And I agree automatically disabling the cursor when the TextBox is disabled makes sense.
I know what you're thinking ... Don't think that.

Pumaman

#5
QuoteAnd I agree automatically disabling the cursor when the TextBox is disabled makes sense.

I concur, sounds reasonable.

(Edit by strazer: AGS v2.72 RC 2: * Disabled text boxes now do not draw the cursor.)

SMF spam blocked by CleanTalk