fix international chat in Toontown

This commit is contained in:
David Rose 2006-03-09 22:31:38 +00:00
parent 0df4c3fa22
commit 34cd6206a2

View File

@ -11,6 +11,9 @@ class DirectEntry(DirectFrame):
DirectEntry(parent) - Create a DirectGuiWidget which responds
to keyboard buttons
"""
directWtext = ConfigVariableBool('direct-wtext', 1)
def __init__(self, parent = None, **kw):
# Inherits from DirectFrame
# A Direct Frame can have:
@ -156,6 +159,12 @@ class DirectEntry(DirectFrame):
self.guiItem.setText(text)
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:
return self.guiItem.getWtext()
else: