def SetDefaultInfo(self): self.evolname.SetText("") self.petname.SetText("") self.petlevel.SetText("") self.petages.SetText("") self.petdur.SetText("") self.pethp.SetText("") self.petdef.SetText("") self.petsp.SetText("") self.SetDuration("0", "0") self.slotimgpet.ClearSlot(0) self.petskill0.ClearSlot(0) self.petskill0.ClearSlot(1) self.petskill0.ClearSlot(2) self.petskill0.SetSlot(0, 2, 32, 32, petskill.GetEmptySkill()) self.petskill0.SetSlot(1, 2, 32, 32, petskill.GetEmptySkill()) self.petskill0.SetSlot(2, 2, 32, 32, petskill.GetEmptySkill()) self.SetExperience(0,0,0) self.arrytooltip = [ [-1,-1], [-1,-1], [-1,-1]] self.nutribtn.Disable() self.sviluppobtn.Disable() self.itemexp.Disable()
def SetDefaultInfo(self): self.SetDuration("0", "0") self.main_slot_img.ClearSlot(0) self.skillslot.ClearSlot(0) self.skillslot.ClearSlot(1) self.skillslot.ClearSlot(2) self.skillslot.SetSlotScale(0, 2, 16, 16, petskill.GetEmptySkill(), 0.5, 0.5) self.skillslot.SetSlotScale(1, 2, 16, 16, petskill.GetEmptySkill(), 0.5, 0.5) self.skillslot.SetSlotScale(2, 2, 16, 16, petskill.GetEmptySkill(), 0.5, 0.5) self.SetExperience(0,0,0)
def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "uiscript/PetInformationWindow.py") except: import exception exception.Abort("PetInformationWindow.LoadWindow.LoadObject") try: self.feedwind = uipetfeed.PetFeedWindow() self.board = self.GetChild("board") self.boardclose = self.GetChild("CloseButton") self.slotimgpet = self.GetChild("UpBringing_Pet_Slot") self.evolname = self.GetChild("EvolName") self.petname = self.GetChild("PetName") self.expwind = self.GetChild("UpBringing_Pet_EXP_Gauge_Board") self.tooltipexp = [] for i in range(0,4): self.tooltipexp.append(self.TextToolTip(15*i)) self.tooltipexp[i].Hide() self.petlifeg = self.GetChild("LifeGauge") self.petlevel = self.GetChild("LevelValue") self.petexpa = self.GetChild("UpBringing_Pet_EXPGauge_01") self.petexpb = self.GetChild("UpBringing_Pet_EXPGauge_02") self.petexpc = self.GetChild("UpBringing_Pet_EXPGauge_03") self.petexpd = self.GetChild("UpBringing_Pet_EXPGauge_04") self.petexpe = self.GetChild("UpBringing_Pet_EXPGauge_05") self.petexppages = [] self.petexppages.append(self.petexpa) self.petexppages.append(self.petexpb) self.petexppages.append(self.petexpc) self.petexppages.append(self.petexpd) self.petexppages.append(self.petexpe) for exp in self.petexppages: exp.SetSize(0, 0) #exp.Hide() self.petages = self.GetChild("AgeValue") self.petdur = self.GetChild("LifeTextValue") #gaugehp self.nutribtn = self.GetChild("FeedLifeTimeButton") self.sviluppobtn = self.GetChild("FeedEvolButton") self.itemexp = self.GetChild("FeedExpButton") self.pethp = self.GetChild("HpValue") self.petdef = self.GetChild("DefValue") self.petsp = self.GetChild("SpValue") self.petskill0 = self.GetChild("PetSkillSlot0") #self.petskill0.SetPetSkillSlot(0, 2, 10) #self.petskill0.SetPetSkillSlot(1, 11, 10) #self.petskill0.SetPetSkillSlot(2, 5, 10) self.petskill0.SetSlot(0, 2, 32, 32, petskill.GetEmptySkill()) self.petskill0.SetSlot(1, 2, 32, 32, petskill.GetEmptySkill()) self.petskill0.SetSlot(2, 2, 32, 32, petskill.GetEmptySkill()) #self.petskill0.SetCoverButton(0) #self.petskill0.SetCoverButton(1) #self.petskill0.SetCoverButton(2) #self.petskill0.SetAlwaysRenderCoverButton(0, TRUE) #self.petskill0.SetAlwaysRenderCoverButton(1, TRUE) #self.petskill0.SetAlwaysRenderCoverButton(2, TRUE) self.petskill0.SetSelectItemSlotEvent(ui.__mem_func__(self.UseSkill)) self.petskill0.SetUseSlotEvent(ui.__mem_func__(self.UseSkill)) self.petskill0.SetOverInItemEvent(ui.__mem_func__(self.PetSkillTooltipShow)) self.petskill0.SetOverOutItemEvent(ui.__mem_func__(self.PetSkillTooltipHide)) self.SetDefaultInfo() self.arrytooltip = [ [-1,-1], [-1,-1], [-1,-1]] PET_FILE_NAME = "%s/pet_skill.txt" % app.GetLocalePath() PET_FILE_SKILL = "%s/pet_skill_bonus.txt" % app.GetLocalePath() self.linespet = pack_open(PET_FILE_NAME, "r").readlines() self.linespetskill = pack_open(PET_FILE_SKILL, "r").readlines() self.SkillTooltip = uiToolTip.ToolTip(180) #Event self.boardclose.SetEvent(ui.__mem_func__(self.Close,)) self.nutribtn.SetToggleDownEvent(lambda arg=0,arg1=1: self.OpenFeedBox(arg,arg1)) self.nutribtn.SetToggleUpEvent(lambda arg=1,arg1=0: self.OpenFeedBox(arg,arg1)) self.itemexp.SetToggleDownEvent(lambda arg=0,arg1=3: self.OpenFeedBox(arg,arg1)) self.itemexp.SetToggleUpEvent(lambda arg=1,arg1=0: self.OpenFeedBox(arg,arg1)) self.sviluppobtn.SetToggleDownEvent(lambda arg=0: self.evolution(arg)) self.sviluppobtn.SetToggleUpEvent(lambda arg=1: self.evolution(arg)) except: import exception exception.Abort("PetInformationWindow.LoadWindow.BindObject")