Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: woshihuo12 on August 28, 2015, 10:25:55 PM

Title: i have a problem with UIInput about chinese..
Post by: woshihuo12 on August 28, 2015, 10:25:55 PM
my game use chinese ttf font. So at IOS, if player can input the ios's expression, so the UILabel will have some problem..
so i want limit the ios's expression, let player can't input the expression.
how can i get that?

very thanks............
Title: Re: i have a problem with UIInput about chinese..
Post by: ArenMook on August 30, 2015, 02:47:05 PM
You'll need to create your own UIInput.onValidate function to reject such characters.
Title: Re: i have a problem with UIInput about chinese..
Post by: woshihuo12 on August 30, 2015, 09:38:48 PM
i don't the ios expression's code. so i write like this:

    private char OnInputValidata(string text, int pos, char ch)
    {
        if (ch >= 0x0000 && ch <= 0xFFEF) return ch;
        return (char)0;
    }