def doDialog(self, nDialog): self.destroyDialog() self.dialogStack.append(nDialog) if nDialog == Dialog_MainMenu: self.acceptOnce(self.mainMenuDoneEvent, self.__handleMainMenuDlg) self.dialog = self.MainMenuDlg(self.mainMenuDoneEvent) elif nDialog == Dialog_AdoptPet: self.acceptOnce(self.adoptPetDoneEvent, self.__handleAdoptPetDlg) self.dialog = self.AdoptPetDlg(self.adoptPetDoneEvent, self.petSeeds[self.adoptPetNum], self.adoptPetNameIndex) elif nDialog == Dialog_ChoosePet: self.acceptOnce(self.petChooserDoneEvent, self.__handleChoosePetDlg) self.dialog = self.ChoosePetDlg(self.petChooserDoneEvent, self.petSeeds) elif nDialog == Dialog_ReturnPet: self.acceptOnce(self.returnPetDoneEvent, self.__handleReturnPetDlg) self.dialog = self.ReturnPetDlg(self.returnPetDoneEvent) elif nDialog == Dialog_SellFish: self.acceptOnce(self.fishGuiDoneEvent, self.__handleFishSellDlg) self.dialog = FishSellGUI.FishSellGUI(self.fishGuiDoneEvent) elif nDialog == Dialog_NamePicker: self.acceptOnce(self.namePickerDoneEvent, self.__handleNamePickerDlg) self.dialog = self.NamePicker(self.namePickerDoneEvent, self.petSeeds[self.adoptPetNum], gender=self.adoptPetNum % 2) elif nDialog == Dialog_GoHome: self.acceptOnce(self.goHomeDlgDoneEvent, self.__handleGoHomeDlg) self.dialog = self.GoHomeDlg(self.goHomeDlgDoneEvent)
def popupFishGUI(self, task): self.setChatAbsolute('', CFSpeech) self.acceptOnce(self.fishGuiDoneEvent, self.__handleSaleDone) self.fishGui = FishSellGUI.FishSellGUI(self.fishGuiDoneEvent)
def popupFishGUI(self): base.setCellsAvailable(base.bottomCells, 0) base.cr.playGame.getPlace().setState('stopped') self.acceptOnce(self.fishGuiDoneEvent, self.__handleFishSaleDone) self.fishGui = FishSellGUI.FishSellGUI(self.fishGuiDoneEvent) self.accept('stoppedAsleep', self.__handleFishSaleDone)
def popupFishGUI(self, task): assert self.notify.debug('popupFishGUI()') self.setChatAbsolute('', CFSpeech) self.acceptOnce(self.fishGuiDoneEvent, self.__handleSaleDone) self.fishGui = FishSellGUI.FishSellGUI(self.fishGuiDoneEvent)