NGUi simply goes by what Unity and the OS feeds it. Does it even receive the comma? Did you check that? Also try printing out what NGUI is validating there.
Hi ArenMook,
I finally had time to debug this problem some more. I've checked the input with an GUI.TextField and there it is printing commas.
I've checked the settings with Decimal validation and keyboard type:
- Default -> Comma's work
- ASCIICapable -> Comma's work
- NumbersAndPunctuation -> No comma's in validation and in UIInput field and in Eclipse Logcat
- URL -> Comma's work
- NumberPad -> No comma's in validation and in UIInput and in Eclipse Logcat
- PhonePad -> Comma's work
- NamePhonePad -> Comma's work
- EmailAddress ->Comma's work
I'm using the latest version of NGUI downloaded from the Asset store and i'm using the latest version of Unity3D (4.5.2).
Here's the current code for Decimal validation:
public enum Validation
{
None,
Integer,
Float,
Alphanumeric,
Username,
Decimal,
Name,
}
else if (validation == Validation.Decimal)
{
Debug.Log ("text: " + text + " pos: " + pos + " char: " + ch);
// Decimal number
if (ch >= '0' && ch <= '9') return ch;
if (ch == ',' && !text.Contains(",")) return ch;
}
Any idea?