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 / Android & iOS. How to force English text input?

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 2nd Apr 2017 20:34
I want to make player name input. And I need to make it in English only. But the StartTextInput() function can be used for any language.
How can I force English-only text input using standart AppGameKit functions for Android and iOS?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 2nd Apr 2017 22:29
at android i had setup myself two languages and can switch between german and english in on screen keyboard if me click the world icon.
i think you need a feature request for agk that it open a english layout on screen keyboard via language parameter. like en-US en-UK
else you can show up a selfmade key map image (sprite).
AGK (Steam) V2017.02.28 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 3rd Apr 2017 10:43
Thank you Markus, maybe the selfmade key map is the best way for now...
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Apr 2017 11:12
yes but keep in mind that some users have a bluetooth or physical keyboard. see Input-Raw.
AGK (Steam) V2017.03.31 : Windows 10 Pro 64 Bit : AMD (17.2.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 3rd Apr 2017 13:30
Thank you Markus! This advice also useful for Windows.
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 4th Apr 2017 16:05 Edited at: 4th Apr 2017 16:08
One thing I'm doing in something I've started to work on is use the StripString function. The strip string function removes characters from a string. You would load it with characters you want to allow and then if there's any characters left after stripping the valid ones then that would suggest that the name is invalid.

Here's what I mean





I'm using this to only allow alphanumeric usernames, and have added some special characters to it for when checking for valid passwords.

https://www.appgamekit.com/documentation/Reference/Core/StripString.htm

Login to post a reply

Server time is: 2024-11-24 16:52:54
Your offset time is: 2024-11-24 16:52:54