1
Window / [Solved] getting input and put them into a string
« on: June 14, 2008, 05:32:52 pm »
I think non-international characters are not working because you cast to char instead of wchar_t or something similar.
Also you should check if event.Text.Unicode returns a printable character:
The backspace/return issue should be solved then.
(Check for them manually and remove the last character or add a "\n" to your string if you want the backspace/newline functionality)
I would be interested in the casting part too, what do I have to do with the Uint16 event.Text.Unicode gives me, to be able to append it to a string?
Code: [Select]
inputField += (char)event.Text.Unicode
Also you should check if event.Text.Unicode returns a printable character:
Code: [Select]
if(event.Text.Unicode < 0x80){
...do something with char...
}
The backspace/return issue should be solved then.
(Check for them manually and remove the last character or add a "\n" to your string if you want the backspace/newline functionality)
I would be interested in the casting part too, what do I have to do with the Uint16 event.Text.Unicode gives me, to be able to append it to a string?