mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 12:12:36 -06:00
Fix pick a name button
This commit is contained in:
parent
3a29c8995f
commit
3b93cd6596
3 changed files with 2 additions and 7 deletions
|
@ -87,7 +87,7 @@ def checkName(name, otherCheckFuncs = [], font = None):
|
||||||
tn = TextNode('NameCheck')
|
tn = TextNode('NameCheck')
|
||||||
tn.setFont(font)
|
tn.setFont(font)
|
||||||
for c in name:
|
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))
|
notify.info('name contains bad char: %s' % TextEncoder().encodeWtext(c))
|
||||||
return OTPLocalizer.NCBadCharacter % TextEncoder().encodeWtext(c)
|
return OTPLocalizer.NCBadCharacter % TextEncoder().encodeWtext(c)
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ class AvatarChoice(DirectButton):
|
||||||
if self.approvedName != '':
|
if self.approvedName != '':
|
||||||
self.nameText['text'] = self.approvedName
|
self.nameText['text'] = self.approvedName
|
||||||
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
|
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()
|
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)
|
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 != '':
|
if self.wantName != '':
|
||||||
|
@ -156,9 +156,6 @@ class AvatarChoice(DirectButton):
|
||||||
self.verify.show()
|
self.verify.show()
|
||||||
self.accept('verifyDone', self.__handleVerifyDelete)
|
self.accept('verifyDone', self.__handleVerifyDelete)
|
||||||
|
|
||||||
def __handleNameYourToon(self):
|
|
||||||
messenger.send(self.doneEvent, ['nameIt', self.position])
|
|
||||||
|
|
||||||
def __handleVerifyDelete(self):
|
def __handleVerifyDelete(self):
|
||||||
status = self.verify.doneStatus
|
status = self.verify.doneStatus
|
||||||
self.ignore('verifyDone')
|
self.ignore('verifyDone')
|
||||||
|
|
|
@ -210,8 +210,6 @@ class AvatarChooser(StateData.StateData):
|
||||||
self.choice = panelChoice
|
self.choice = panelChoice
|
||||||
if panelDoneStatus == 'chose':
|
if panelDoneStatus == 'chose':
|
||||||
self.__handleChoice()
|
self.__handleChoice()
|
||||||
elif panelDoneStatus == 'nameIt':
|
|
||||||
self.__handleChoice()
|
|
||||||
elif panelDoneStatus == 'delete':
|
elif panelDoneStatus == 'delete':
|
||||||
self.__handleDelete()
|
self.__handleDelete()
|
||||||
elif panelDoneStatus == 'create':
|
elif panelDoneStatus == 'create':
|
||||||
|
|
Loading…
Reference in a new issue