mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-20 05:54:54 -04:00
fix international chat in Toontown
This commit is contained in:
parent
0df4c3fa22
commit
34cd6206a2
@ -11,6 +11,9 @@ class DirectEntry(DirectFrame):
|
|||||||
DirectEntry(parent) - Create a DirectGuiWidget which responds
|
DirectEntry(parent) - Create a DirectGuiWidget which responds
|
||||||
to keyboard buttons
|
to keyboard buttons
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
directWtext = ConfigVariableBool('direct-wtext', 1)
|
||||||
|
|
||||||
def __init__(self, parent = None, **kw):
|
def __init__(self, parent = None, **kw):
|
||||||
# Inherits from DirectFrame
|
# Inherits from DirectFrame
|
||||||
# A Direct Frame can have:
|
# A Direct Frame can have:
|
||||||
@ -156,6 +159,12 @@ class DirectEntry(DirectFrame):
|
|||||||
self.guiItem.setText(text)
|
self.guiItem.setText(text)
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
|
if not self.directWtext.getValue():
|
||||||
|
# If the user has configured wide-text off, then always
|
||||||
|
# return an 8-bit string. This will be encoded if
|
||||||
|
# necessary, according to Panda's default encoding.
|
||||||
|
return self.guiItem.getText()
|
||||||
|
|
||||||
if self.unicodeText:
|
if self.unicodeText:
|
||||||
return self.guiItem.getWtext()
|
return self.guiItem.getWtext()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user