Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetTextInput() Question

Author
Message
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 30th Aug 2011 19:05
Hello, I have been playing around with this for a high score entry table. I have it running at the moment but have one niggle that I would like to address if possible.
At the moment, it lets you input your name, if your entry is too long it sends you back to the name entry section. This seems a little 1980's to me though. I would prefer to it to limit the text you can type in to the box, to the character limit I have set. I cannot however see any way to alter the contents of the text input box, either before or during use.
I could probably write something that checks manually for key presses, and displays a string instead which would work. However as I would like this to work universally on all devices at some point, I am keen to use this command.

So if there is no way at the minute to set the maximum length of the textentry() command at the moment. Would it be possible to add it as an option?

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 30th Aug 2011 19:09
I would actually quite like this, I have yet to receive the software.. But I can imagine this being quite a dealbreaker, especially when you have limited space to work with on highscore tables on smaller screens. You'll want to limit your names a little..
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 30th Aug 2011 20:17 Edited at: 30th Aug 2011 20:28
Just a thought, and I'll test it later...

From the help entry on text input:

Quote: "You cannot assume that any part of your app will be visible whilst text entry is in progress, although your code will continue running"


How about if you StartTextInput() and then, since your program is still running, trap key presses in the background? Do the virtual keyboard keypresses count as key-code key presses?

On with the investigation!

EDIT: Rats! GetRawKeyReleased() doesn't pick up the keystrokes while the StartTextInput() window is up.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Aug 2011 22:16
A character limit on the text entry is something that will get looked at in future, but it is not a priority right now.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 30th Aug 2011 22:53
I should imagine it wouldn't be hard to implement as it is limited now to 21 characters, so all you would need is another variable the user can change to set that. I will have to stick with the method I have at the moment. I'm sure you are busy fixing bugs and working on the other platforms, so I'm not surprised it isn't a priority. At least I know it will be done at some point, thanks!

Login to post a reply

Server time is: 2024-11-21 18:07:16
Your offset time is: 2024-11-21 18:07:16