From 3b93cd65963b560e20a996dcc5235c0c28d64916 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 4 Jul 2015 11:38:44 +0300 Subject: [PATCH] Fix pick a name button --- otp/namepanel/NameCheck.py | 2 +- toontown/login/AvatarChoice.py | 5 +---- toontown/login/AvatarChooser.py | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/otp/namepanel/NameCheck.py b/otp/namepanel/NameCheck.py index f360d58b..31ac3343 100755 --- a/otp/namepanel/NameCheck.py +++ b/otp/namepanel/NameCheck.py @@ -87,7 +87,7 @@ def checkName(name, otherCheckFuncs = [], font = None): tn = TextNode('NameCheck') tn.setFont(font) for c in name: - if not tn.hasCharacter(ord(c)): + if not tn.hasCharacter(unicode(c)): notify.info('name contains bad char: %s' % TextEncoder().encodeWtext(c)) return OTPLocalizer.NCBadCharacter % TextEncoder().encodeWtext(c) diff --git a/toontown/login/AvatarChoice.py b/toontown/login/AvatarChoice.py index e800a5c3..0418936b 100755 --- a/toontown/login/AvatarChoice.py +++ b/toontown/login/AvatarChoice.py @@ -74,7 +74,7 @@ class AvatarChoice(DirectButton): if self.approvedName != '': self.nameText['text'] = self.approvedName guiButton = loader.loadModel('phase_3/models/gui/quit_button') - self.nameYourToonButton = DirectButton(parent=self, relief=None, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), text=(TTLocalizer.AvatarChoiceNameYourToon, TTLocalizer.AvatarChoiceNameYourToon, TTLocalizer.AvatarChoiceNameYourToon), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.15, text_pos=(0, 0.03), text_font=ToontownGlobals.getInterfaceFont(), pos=(-0.2, 0, -0.3), scale=0.45, image_scale=(2, 1, 3), command=self.__handleNameYourToon) + self.nameYourToonButton = DirectButton(parent=self, relief=None, image=(guiButton.find('**/QuitBtn_UP'), guiButton.find('**/QuitBtn_DN'), guiButton.find('**/QuitBtn_RLVR')), text=(TTLocalizer.AvatarChoiceNameYourToon, TTLocalizer.AvatarChoiceNameYourToon, TTLocalizer.AvatarChoiceNameYourToon), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.15, text_pos=(0, 0.03), text_font=ToontownGlobals.getInterfaceFont(), pos=(-0.2, 0, -0.3), scale=0.45, image_scale=(2, 1, 3), command=self.__handleCreate) guiButton.removeNode() self.statusText = DirectLabel(parent=self, relief=None, scale=0.09, pos=(0, 0, -0.24), text='', text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_wordwrap=7.5, text_scale=TTLocalizer.ACstatusText, text_font=ToontownGlobals.getToonFont(), state=DGG.DISABLED) if self.wantName != '': @@ -156,9 +156,6 @@ class AvatarChoice(DirectButton): self.verify.show() self.accept('verifyDone', self.__handleVerifyDelete) - def __handleNameYourToon(self): - messenger.send(self.doneEvent, ['nameIt', self.position]) - def __handleVerifyDelete(self): status = self.verify.doneStatus self.ignore('verifyDone') diff --git a/toontown/login/AvatarChooser.py b/toontown/login/AvatarChooser.py index a723e258..f448b9ba 100755 --- a/toontown/login/AvatarChooser.py +++ b/toontown/login/AvatarChooser.py @@ -210,8 +210,6 @@ class AvatarChooser(StateData.StateData): self.choice = panelChoice if panelDoneStatus == 'chose': self.__handleChoice() - elif panelDoneStatus == 'nameIt': - self.__handleChoice() elif panelDoneStatus == 'delete': self.__handleDelete() elif panelDoneStatus == 'create':