mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
unicode
This commit is contained in:
parent
33042973b5
commit
172c8ee508
@ -357,7 +357,10 @@ keystroke(const MouseWatcherParameter ¶m, bool background) {
|
|||||||
// A normal visible character. Add a new character to the
|
// A normal visible character. Add a new character to the
|
||||||
// text entry, if there's room.
|
// text entry, if there's room.
|
||||||
|
|
||||||
string new_char(1, (char)keycode);
|
// Encode the character. This might expand it to two or
|
||||||
|
// three bytes, or it might remain a one-byte character.
|
||||||
|
TextNode *text_node = get_text_def(S_focus);
|
||||||
|
string new_char = text_node->encode_wchar(keycode);
|
||||||
|
|
||||||
if (get_max_chars() > 0 && (int)_text.length() >= get_max_chars()) {
|
if (get_max_chars() > 0 && (int)_text.length() >= get_max_chars()) {
|
||||||
overflow(param);
|
overflow(param);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user