def OnInput(self): self.needInputString = True event.AddEventSetLocalYPosition(self.descIndex, 5+10) yPos = event.GetEventSetLocalYPosition(self.descIndex) self.editSlot = ui.SlotBar() self.editSlot.SetSize(200, 18) self.editSlot.SetPosition(0, yPos) self.editSlot.SetParent(self.board) self.editSlot.SetWindowHorizontalAlignCenter() self.editSlot.Show() self.editLine = ui.EditLine() self.editLine.SetParent(self.editSlot) self.editLine.SetPosition(3, 3) self.editLine.SetSize(200, 17) self.editLine.SetMax(30) self.editLine.SetFocus() self.editLine.Show() event.AddEventSetLocalYPosition(self.descIndex, 25+10) self.MakeNextButton(event.BUTTON_TYPE_DONE) self.editLine.UpdateRect() self.editSlot.UpdateRect() self.board.UpdateRect()
def CreateSlotBar(self, parent, x, y, width, heigh): SlotBar = ui.SlotBar() if parent != None: SlotBar.SetParent(parent) SlotBar.SetSize(width, heigh) SlotBar.SetPosition(x, y) SlotBar.Show() return SlotBar
def LoadUI(self): self.Board = ui.BoardWithTitleBar() self.Board.SetSize(397, 310) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("GM-Nachricht schreiben") self.Board.SetCloseEvent(self.__del__) self.Board.Show() self.SlotBar = ui.SlotBar() self.SlotBar.SetParent(self.Board) self.SlotBar.SetPosition(15, 35) self.SlotBar.SetSize(367, 230) self.SlotBar.Show() i = 0 max_lines = 14 height = 8 while i < max_lines: self.EditLines[i] = ui.EditLine() self.EditLines[i].SetParent(self.SlotBar) self.EditLines[i].SetPosition(8, height) self.EditLines[i].SetSize(367, 15) self.EditLines[i].SetMax(70) self.EditLines[i].Show() i = i + 1 height = height + 15 self.EditLines[0].SetFocus() self.SendButton = ui.Button() self.SendButton.SetParent(self.Board) self.SendButton.SetPosition(15, 275) self.SendButton.SetUpVisual( "d:/ymir work/ui/public/large_button_01.sub") self.SendButton.SetOverVisual( "d:/ymir work/ui/public/large_button_02.sub") self.SendButton.SetDownVisual( "d:/ymir work/ui/public/large_button_03.sub") self.SendButton.SetText("Absenden") self.SendButton.SetEvent(self.PostGMMessage) self.SendButton.Show() self.DeleteButton = ui.Button() self.DeleteButton.SetParent(self.Board) self.DeleteButton.SetPosition(110, 275) self.DeleteButton.SetUpVisual( "d:/ymir work/ui/public/large_button_01.sub") self.DeleteButton.SetOverVisual( "d:/ymir work/ui/public/large_button_02.sub") self.DeleteButton.SetDownVisual( "d:/ymir work/ui/public/large_button_03.sub") self.DeleteButton.SetText("Löschen") self.DeleteButton.SetEvent(self.ClearGMMessage) self.DeleteButton.Show()
def SlotBar(self, parent, x, y, width, heigh): tmpSlotBar = ui.SlotBar() if parent: tmpSlotBar.SetParent(parent) tmpSlotBar.SetSize(width, heigh) tmpSlotBar.SetPosition(x, y) tmpSlotBar.Show() return tmpSlotBar
def SlotWithText(self, parent, text, x, y, width, height): SlotBar = ui.SlotBar() if parent != None: SlotBar.SetParent(parent) SlotBar.SetSize(width, height) SlotBar.SetPosition(x, y) SlotBar.Show() textline = ui.TextLine() textline.SetParent(SlotBar) textline.SetPosition(5, 1) textline.SetText(text) textline.Show() return SlotBar, textline
def Create_SlotLine(self, parent, editlineText, x, y, width, heigh): SlotBar = ui.SlotBar() if parent != None: SlotBar.SetParent(parent) SlotBar.SetSize(width, heigh) SlotBar.SetPosition(x, y) SlotBar.Show() textline = ui.TextLine() textline.SetParent(SlotBar) textline.SetPosition(2, 2) textline.SetText(editlineText) textline.Show() return textline
def CheckBonus(self, bonus, bonuslist, offset): for boni in bonuslist: if bonus[0] == boni: try: Index = bonuslist.index(boni) BonusDescription = ui.TextLine() BonusDescription.SetParent(self.Board) BonusDescription.SetPosition(offset[Index][0] + 20, offset[Index][1] + 35) BonusDescription.SetText(str(bonus[0])) BonusDescription.Show() BonusSlotBar = ui.SlotBar() BonusSlotBar.SetParent(self.Board) BonusSlotBar.SetSize(115, 15) BonusSlotBar.SetPosition(offset[Index][0] + 20, offset[Index][1] + 15 + 35) BonusSlotBar.Show() BonusAttrLine = ui.TextLine() BonusAttrLine.SetParent(self.Board) BonusAttrLine.SetPosition(offset[Index][0] + 5 + 20, offset[Index][1] + 15 + 35) try: Type = self.SpecialBoni[bonus[1]] Attribute = self.EquipAttribute(bonus) except: Attribute = fgGHGjjFHJghjfFG1545gGG.GetStatus( int(bonus[2])) if self.TestSystem != 1: BonusAttrLine.SetText(str(Attribute)) # try: # if int(Attribute) >= int(self.MaxBoni[str(bonus[1])]): # BonusAttrLine.SetFontColor(1.0, 0.63, 0) # else: # BonusAttrLine.SetFontColor(1, 1, 1) # except: # BonusAttrLine.SetFontColor(1, 1, 1) else: BonusAttrLine.SetText("Test system is active") BonusAttrLine.SetFontColor(0.1, 0.7, 1.0) BonusAttrLine.Show() self.BonusList.append( [BonusDescription, BonusAttrLine, BonusSlotBar]) except: pass
def EditLine(self, parent, editlineText, x, y, width, heigh, max): SlotBar = ui.SlotBar() if parent != None: SlotBar.SetParent(parent) SlotBar.SetSize(width, heigh) SlotBar.SetPosition(x, y) SlotBar.Show() Value = ui.EditLine() Value.SetParent(SlotBar) Value.SetSize(width, heigh) Value.SetPosition(1, 1) Value.SetMax(max) Value.SetLimitWidth(width) Value.SetMultiLine() Value.SetText(editlineText) Value.Show() return SlotBar, Value
def LoadUI(self): self.Board = ui.BoardWithTitleBar() self.Board.SetSize(400, 510) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("") self.Board.SetCloseEvent(self.noclose) self.Board.Show() self.HeadImages = ui.ImageBox() self.HeadImages.SetParent(self.Board) self.HeadImages.SetPosition(15, 35) #self.HeadImages.LoadImage("d:/ymir work/ui/game/windows/box_face.sub") self.HeadImages.Show() self.HeadThinBoard = ui.ThinBoard() self.HeadThinBoard.SetParent(self.Board) self.HeadThinBoard.SetSize(371, 55) self.HeadThinBoard.SetPosition(15, 35) self.HeadThinBoard.Show() self.SlotBar = ui.SlotBar() self.SlotBar.SetParent(self.Board) self.SlotBar.SetPosition(15, 95) self.SlotBar.SetSize(370, 370) self.SlotBar.Show() i = 0 max_line = 23 pos_h = 8 while i < max_line: self.TextLines[i] = ui.TextLine() self.TextLines[i].SetParent(self.SlotBar) self.TextLines[i].SetPosition(8, pos_h) self.TextLines[i].SetText("Zeile: " + str(i)) self.TextLines[i].Show() i = i + 1 pos_h = pos_h + 15 self.NextButton = ui.Button() self.NextButton.SetParent(self.Board) self.NextButton.SetPosition(15, 470) self.NextButton.SetUpVisual( "d:/ymir work/ui/public/large_button_01.sub") self.NextButton.SetOverVisual( "d:/ymir work/ui/public/large_button_02.sub") self.NextButton.SetDownVisual( "d:/ymir work/ui/public/large_button_03.sub") self.NextButton.SetText("Letzte Seite") self.NextButton.SetEvent(self.ButtonBack) self.NextButton.Show() self.BackButton = ui.Button() self.BackButton.SetParent(self.Board) self.BackButton.SetPosition(300, 470) self.BackButton.SetUpVisual( "d:/ymir work/ui/public/large_button_01.sub") self.BackButton.SetOverVisual( "d:/ymir work/ui/public/large_button_02.sub") self.BackButton.SetDownVisual( "d:/ymir work/ui/public/large_button_03.sub") self.BackButton.SetText("Nächste Seite") self.BackButton.SetEvent(self.ButtonNext) self.BackButton.Show() self.DeleteButton = ui.Button() self.DeleteButton.SetParent(self.Board) self.DeleteButton.SetPosition(155, 470) self.DeleteButton.SetUpVisual( "d:/ymir work/ui/public/large_button_01.sub") self.DeleteButton.SetOverVisual( "d:/ymir work/ui/public/large_button_02.sub") self.DeleteButton.SetDownVisual( "d:/ymir work/ui/public/large_button_03.sub") self.DeleteButton.SetText("Schließen") self.DeleteButton.SetEvent(self.CloseIntroDungeonGUIAndContinue) self.DeleteButton.Hide() self.SetPage() self.Board.Hide()
def LoadUI(self): constInfo.PET_INFOS["gui_box"] = 1 self.Board = ui.BoardWithTitleBar() self.Board.SetSize(200, 210) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") if constInfo.PET_INFOS["box_mode"] == 0: self.Board.SetTitleName("Brutkasten") else: self.Board.SetTitleName("Name ändern") self.Board.SetCloseEvent(self.close) self.Board.Show() self.PetItemSlotIMG = ui.ImageBox() self.PetItemSlotIMG.SetParent(self.Board) self.PetItemSlotIMG.SetPosition(80,35) self.PetItemSlotIMG.LoadImage("exterminatus/new_pet_images/pet_incu_slot_001.tga") self.PetItemSlotIMG.Show() self.PetItemVnumIMG = ui.ImageBox() self.PetItemVnumIMG.SetParent(self.PetItemSlotIMG) self.PetItemVnumIMG.SetPosition(4,4) self.PetItemVnumIMG.LoadImage("icon/item/55001.tga") self.PetItemVnumIMG.Show() self.PetNameBox = ui.ThinBoard() self.PetNameBox.SetParent(self.Board) self.PetNameBox.SetPosition(15,80) self.PetNameBox.SetSize(170,70) self.PetNameBox.Show() self.PetNameTitle = ui.TextLine() self.PetNameTitle.SetParent(self.PetNameBox) self.PetNameTitle.SetPosition(52,3) self.PetNameTitle.SetText("Name des Pets") self.PetNameTitle.Show() self.PetNameSlotBar = ui.SlotBar() self.PetNameSlotBar.SetParent(self.PetNameBox) self.PetNameSlotBar.SetPosition(8,22) self.PetNameSlotBar.SetSize(152,19) self.PetNameSlotBar.Show() self.NameInput = ui.EditLine() self.NameInput.SetParent(self.PetNameSlotBar) self.NameInput.SetPosition(5,3) self.NameInput.SetSize(142,19) self.NameInput.SetMax(12) self.NameInput.OnSetFocus() self.NameInput.Show() if constInfo.PET_INFOS["box_mode"] == 0: self.PetPriceTitle = ui.TextLine() self.PetPriceTitle.SetParent(self.Board) self.PetPriceTitle.SetPosition(55,155) self.PetPriceTitle.SetText("Preis: " + self.NumberToCoinsString(self.goldPrice)) self.PetPriceTitle.Show() self.FinishButton = ui.Button() self.FinishButton.SetParent(self.Board) self.FinishButton.SetPosition(60,175) #self.FinishButton.SetText("Ausbrüten") self.FinishButton.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub") self.FinishButton.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub") self.FinishButton.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub") self.FinishButton.SetEvent(self.FinishConfig) self.FinishButton.Show() self.FinishButtonTextLine = ui.TextLine() self.FinishButtonTextLine.SetParent(self.FinishButton) self.FinishButtonTextLine.SetPosition(20,3) if constInfo.PET_INFOS["box_mode"] == 0: self.FinishButtonTextLine.SetText("Ausbrüten") else: self.FinishButtonTextLine.SetText("Ändern") self.FinishButtonTextLine.Show()
def LoadUI(self): if constInfo.PET_INFOS["gui"] == 1: constInfo.PET_INFOS["gui"] = 0 self.__del__() return self.Board = ui.BoardWithTitleBar() self.Board.SetSize(400, 415) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Pet") self.Board.SetCloseEvent(self.__del__) self.Board.Show() self.tooltip = uiToolTip.ToolTip() self.tooltip.HideToolTip() self.HeadBoard = ui.ThinBoard() self.HeadBoard.SetParent(self.Board) self.HeadBoard.SetPosition(15,35) self.HeadBoard.SetSize(370,80) self.HeadBoard.Show() self.PetItemSlotIMG = ui.ImageBox() self.PetItemSlotIMG.SetParent(self.HeadBoard) self.PetItemSlotIMG.SetPosition(15,17) self.PetItemSlotIMG.LoadImage("exterminatus/new_pet_images/pet_incu_slot_001.tga") self.PetItemSlotIMG.Show() self.PetItemVnumIMG = ui.ImageBox() self.PetItemVnumIMG.SetParent(self.PetItemSlotIMG) self.PetItemVnumIMG.SetPosition(4,4) self.PetItemVnumIMG.LoadImage("icon/item/55001.tga") self.PetItemVnumIMG.Show() self.PetNameSlotBar = ui.SlotBar() self.PetNameSlotBar.SetParent(self.HeadBoard) self.PetNameSlotBar.SetPosition(70,25) self.PetNameSlotBar.SetSize(225,19) self.PetNameSlotBar.Show() self.PetNameTextLine = ui.TextLine() self.PetNameTextLine.SetParent(self.PetNameSlotBar) self.PetNameTextLine.SetPosition(8,2) self.PetNameTextLine.SetText(str(constInfo.PET_INFOS["name"])) self.PetNameTextLine.Show() self.StatBoard = ui.ThinBoard() self.StatBoard.SetParent(self.Board) self.StatBoard.SetPosition(15,120) self.StatBoard.SetSize(370,120) self.StatBoard.Show() i = 0 y = 15 y_add = 120 headlines = [["Level",36],["Erfahrung",28],["Laufzeit",32]] while i < 3: self.PetContentBoardTitleBars[i] = ui.HorizontalBar() self.PetContentBoardTitleBars[i].SetParent(self.StatBoard) self.PetContentBoardTitleBars[i].SetPosition(y,10) self.PetContentBoardTitleBars[i].Create(100) self.PetContentBoardTitleBars[i].Show() self.PetContentBoardTitleBars[i+10] = ui.TextLine() self.PetContentBoardTitleBars[i+10].SetParent(self.PetContentBoardTitleBars[i]) self.PetContentBoardTitleBars[i+10].SetPosition(headlines[i][1],2) self.PetContentBoardTitleBars[i+10].SetText(str(headlines[i][0])) self.PetContentBoardTitleBars[i+10].Show() if i > 0: self.PetContentBoardTitleBars[i+100] = ui.ImageBox() self.PetContentBoardTitleBars[i+100].SetParent(self.StatBoard) self.PetContentBoardTitleBars[i+100].SetPosition(y-11,5) self.PetContentBoardTitleBars[i+100].LoadImage("exterminatus/new_pet_images/pet_trenn_line.tga") self.PetContentBoardTitleBars[i+100].Show() i = i + 1 y = y + y_add self.PetLevelSlotBar = ui.SlotBar() self.PetLevelSlotBar.SetParent(self.StatBoard) self.PetLevelSlotBar.SetPosition(15,35) self.PetLevelSlotBar.SetSize(98,19) self.PetLevelSlotBar.Show() self.PetLevelTextLine = ui.TextLine() self.PetLevelTextLine.SetParent(self.PetLevelSlotBar) self.PetLevelTextLine.SetPosition(39,2) self.PetLevelTextLine.SetText(" 7") self.PetLevelTextLine.Show() i = 0 y = 142 y_add = 17 while i < 5: self.PetEXPBubble[i] = ui.ImageBox() self.PetEXPBubble[i].SetParent(self.StatBoard) self.PetEXPBubble[i].SetPosition(y,35) self.PetEXPBubble[i].LoadImage("exterminatus/new_pet_images/exp_bubble_empty.tga") self.PetEXPBubble[i].Show() if i < 4: self.expGauge[i] = ui.ExpandedImageBox() self.expGauge[i].SetParent(self.StatBoard) self.expGauge[i].SetPosition(y,35) self.expGauge[i].LoadImage("exterminatus/new_pet_images/exp_bubble_full.tga") self.expGauge[i].Show() else: self.ItemExpGauge[0] = ui.ExpandedImageBox() self.ItemExpGauge[0].SetParent(self.StatBoard) self.ItemExpGauge[0].SetPosition(y,35) self.ItemExpGauge[0].LoadImage("exterminatus/new_pet_images/exp_bubble_item.tga") self.ItemExpGauge[0].Show() i = i + 1 y = y + y_add self.PetEXPBlock = ui.ImageBox() self.PetEXPBlock.SetParent(self.StatBoard) self.PetEXPBlock.SetPosition(142,35) self.PetEXPBlock.LoadImage("exterminatus/new_pet_images/pet_exp_block.tga") self.PetEXPBlock.Show() self.SetExperience(0,2000) self.SetItemExperience(0,2) # self.PetItemEXPSlotIMG = ui.ImageBox() # self.PetItemEXPSlotIMG.SetParent(self.StatBoard) # self.PetItemEXPSlotIMG.SetPosition(167,65) # self.PetItemEXPSlotIMG.LoadImage("d:/ymir work/ui/public/slot_base.sub") # self.PetItemEXPSlotIMG.Show() # self.PetItemEXPSlotItemIMG = ui.ImageBox() # self.PetItemEXPSlotItemIMG.SetParent(self.PetItemEXPSlotIMG) # self.PetItemEXPSlotItemIMG.SetPosition(0,0) # self.PetItemEXPSlotItemIMG.LoadImage("icon/item/55100.tga") # self.PetItemEXPSlotItemIMG.Show() # self.PetItemEXPSlotItemIMGCover = ui.ImageBox() # self.PetItemEXPSlotItemIMGCover.SetParent(self.PetItemEXPSlotIMG) # self.PetItemEXPSlotItemIMGCover.SetPosition(2,2) # self.PetItemEXPSlotItemIMGCover.LoadImage("exterminatus/new_pet_images/slot_block.tga") # self.PetItemEXPSlotItemIMGCover.Show() # self.PetItemEXPSlotItemIMGCover1 = ui.ImageBox() # self.PetItemEXPSlotItemIMGCover1.SetParent(self.PetItemEXPSlotIMG) # self.PetItemEXPSlotItemIMGCover1.SetPosition(2,2) # self.PetItemEXPSlotItemIMGCover1.LoadImage("exterminatus/new_pet_images/slot_block.tga") # self.PetItemEXPSlotItemIMGCover1.Show() # self.PetItemEXPSlotItemSlot = ui.GridSlotWindow() # self.PetItemEXPSlotItemSlot.SetParent(self.PetItemEXPSlotIMG) # self.PetItemEXPSlotItemSlot.ArrangeSlot(1,1,1,32,32,0,0) # self.PetItemEXPSlotItemSlot.SetPosition(0, 0) # #self.PetItemEXPSlotItemSlot.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip)) # #self.PetItemEXPSlotItemSlot.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip)) # self.PetItemEXPSlotItemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot)) # #self.PetItemEXPSlotItemSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.del_slot)) # self.PetItemEXPSlotItemSlot.Show() self.PetLifeTimeSlotBar = ui.SlotBar() self.PetLifeTimeSlotBar.SetParent(self.StatBoard) self.PetLifeTimeSlotBar.SetPosition(255,35) self.PetLifeTimeSlotBar.SetSize(98,19) self.PetLifeTimeSlotBar.Show() self.PetLifeTimeTextLine = ui.TextLine() self.PetLifeTimeTextLine.SetParent(self.PetLifeTimeSlotBar) self.PetLifeTimeTextLine.SetPosition(18,2) self.PetLifeTimeTextLine.SetText("0") self.PetLifeTimeTextLine.Show() # self.PetLifeTimeSlotIMG = ui.ImageBox() # self.PetLifeTimeSlotIMG.SetParent(self.StatBoard) # self.PetLifeTimeSlotIMG.SetPosition(287,65) # self.PetLifeTimeSlotIMG.LoadImage("d:/ymir work/ui/public/slot_base.sub") # self.PetLifeTimeSlotIMG.Show() # self.PetLifeTimeSlotItemIMG = ui.ImageBox() # self.PetLifeTimeSlotItemIMG.SetParent(self.PetLifeTimeSlotIMG) # self.PetLifeTimeSlotItemIMG.SetPosition(0,0) # self.PetLifeTimeSlotItemIMG.LoadImage("icon/item/55102.tga") # self.PetLifeTimeSlotItemIMG.Show() # self.PetLifeTimeSlotItemIMGCover = ui.ImageBox() # self.PetLifeTimeSlotItemIMGCover.SetParent(self.PetLifeTimeSlotIMG) # self.PetLifeTimeSlotItemIMGCover.SetPosition(2,2) # self.PetLifeTimeSlotItemIMGCover.LoadImage("exterminatus/new_pet_images/slot_block.tga") # self.PetLifeTimeSlotItemIMGCover.Show() # self.PetLifeTimeSlotItemIMGCover1 = ui.ImageBox() # self.PetLifeTimeSlotItemIMGCover1.SetParent(self.PetLifeTimeSlotIMG) # self.PetLifeTimeSlotItemIMGCover1.SetPosition(2,2) # self.PetLifeTimeSlotItemIMGCover1.LoadImage("exterminatus/new_pet_images/slot_block.tga") # self.PetLifeTimeSlotItemIMGCover1.Show() # self.LifeTimeSlotItemSlot = ui.GridSlotWindow() # self.LifeTimeSlotItemSlot.SetParent(self.PetLifeTimeSlotIMG) # self.LifeTimeSlotItemSlot.ArrangeSlot(2,1,1,32,32,0,0) # self.LifeTimeSlotItemSlot.SetPosition(0, 0) # self.LifeTimeSlotItemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot)) # self.LifeTimeSlotItemSlot.Show() self.BoniBoard = ui.ThinBoard() self.BoniBoard.SetParent(self.Board) self.BoniBoard.SetPosition(15,245) self.BoniBoard.SetSize(370,100) self.BoniBoard.Show() self.SkillBoard = ui.ThinBoard() self.SkillBoard.SetParent(self.Board) self.SkillBoard.SetPosition(15,350) self.SkillBoard.SetSize(370,50) self.SkillBoard.Show() i = 0 x = 15 list = 0 boni = ["Verteidigung +75","Stark gegen Monster +20%","Chance auf krit. Treffer +10%"] while i < 3: self.PetBoni[i] = ui.TextLine() self.PetBoni[i].SetParent(self.BoniBoard) self.PetBoni[i].SetPosition(15,x) self.PetBoni[i].SetText("Bonus " + str(i+1) + ":") self.PetBoni[i].Show() self.PetBoni[i+3] = ui.TextLine() self.PetBoni[i+3].SetParent(self.BoniBoard) self.PetBoni[i+3].SetPosition(65,x) self.PetBoni[i+3].SetText(str(self.__CreateAffectString(self.PetAffects[list],self.PetAffects[list+1]*2))) self.PetBoni[i+3].SetFontColor(0.5411, 0.7254, 0.5568) self.PetBoni[i+3].Show() list = list + 2 i = i + 1 x = x + 26 self.PetSkillSlotBGImg = ui.ImageBox() self.PetSkillSlotBGImg.SetParent(self.SkillBoard) self.PetSkillSlotBGImg.SetPosition(8,8) self.PetSkillSlotBGImg.LoadImage("d:/ymir work/ui/public/slot_base.sub") self.PetSkillSlotBGImg.Show() self.PetSkillSlotBGImg1 = ui.GridSlotWindow() self.PetSkillSlotBGImg1.SetParent(self.PetSkillSlotBGImg) self.PetSkillSlotBGImg1.ArrangeSlot(3,1,1,32,32,0,0) self.PetSkillSlotBGImg1.SetPosition(0, 0) #self.PetSkillSlotBGImg1.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip)) #self.PetSkillSlotBGImg1.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip)) #self.PetSkillSlotBGImg1.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot)) self.PetSkillSlotBGImg1.SetSelectItemSlotEvent(ui.__mem_func__(self.ActivateSkill)) self.PetSkillSlotBGImg1.Show() self.PetSkillSlotBGImg1.SetItemSlot(3, 70002, constInfo.PET_INFOS["skill_level"]) self.PetSkillNameTitle = ui.TextLine() self.PetSkillNameTitle.SetParent(self.SkillBoard) self.PetSkillNameTitle.SetPosition(45,8) self.PetSkillNameTitle.SetText("Automatisches aufheben") self.PetSkillNameTitle.Show() self.PetSkillNameError = ui.TextLine() self.PetSkillNameError.SetParent(self.SkillBoard) self.PetSkillNameError.SetPosition(45,23) self.PetSkillNameError.SetText("Die Fertigkeit kann erst erlernt werden wenn dein Pet lv.10 ist.") self.PetSkillNameError.SetFontColor(0.9, 0.4745, 0.4627) self.PetSkillNameError.Show() constInfo.PET_INFOS["gui"] = 1
def __MakeBoard(self): self.Board = ui.Board() self.Board.SetParent(self) self.Board.SetSize(self.GetWidth(), self.GetHeight()) self.Board.SetPosition(0, 0) self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.Show() self.TitleBar = ui.TitleBar() self.TitleBar.SetParent(self.Board) self.TitleBar.SetPosition(7, 7) self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red') self.TitleBar.SetCloseEvent(self.Close) self.TitleBar.Show() self.RefreshButton = ui.Button() self.RefreshButton.SetParent(self.TitleBar) self.RefreshButton.SetPosition(3, 3) self.RefreshButton.SetUpVisual( "d:/ymir work/ui/game/guild/refresh_button_01.sub") self.RefreshButton.SetOverVisual( "d:/ymir work/ui/game/guild/refresh_button_02.sub") self.RefreshButton.SetDownVisual( "d:/ymir work/ui/game/guild/refresh_button_03.sub") self.RefreshButton.SetToolTipText("Refresh", 0, -23) self.RefreshButton.SetEvent(lambda: self.__Fill_Up_ChannelList()) self.RefreshButton.Show() self.TitleText = ui.TextLine() self.TitleText.SetParent(self.TitleBar) self.TitleText.SetPosition(0, 4) self.TitleText.SetText("Channel waehlen") self.TitleText.SetWindowHorizontalAlignCenter() self.TitleText.SetHorizontalAlignCenter() self.TitleText.Show() self.ServerName = ui.TextLine() self.ServerName.SetParent(self.TitleBar) self.ServerName.SetPosition(0, self.TitleBar.GetHeight()) self.ServerName.SetText( str(GFHhg54GHGhh45GHGH.GetServerInfo()).split(",")[0]) self.ServerName.SetWindowHorizontalAlignCenter() self.ServerName.SetHorizontalAlignCenter() self.ServerName.Show() self.ChannelListBase = ui.SlotBar() self.ChannelListBase.SetParent(self.Board) self.ChannelListBase.SetSize(self.Board.GetWidth() - 2 * 16, 5 * 18 - 4) self.ChannelListBase.SetPosition( 16, 7 + self.TitleBar.GetHeight() + 6 + 10) self.ChannelListBase.Show() self.ChannelList = ui.ListBox() self.ChannelList.SetParent(self.ChannelListBase) self.ChannelList.SetSize(self.ChannelListBase.GetWidth() - 20, self.ChannelListBase.GetHeight()) self.ChannelList.SetPosition(0, 0) self.ChannelList.SetEvent(ui.__mem_func__(self.__OnSelectChannel)) self.ChannelList.Show() self.ChangeButton = ui.Button() self.ChangeButton.SetParent(self.Board) self.ChangeButton.SetPosition(self.Board.GetWidth() / 2 - 44, self.Board.GetHeight() - 35) self.ChangeButton.SetUpVisual( 'd:/ymir work/ui/public/Large_button_01.sub') self.ChangeButton.SetOverVisual( 'd:/ymir work/ui/public/Large_button_02.sub') self.ChangeButton.SetDownVisual( 'd:/ymir work/ui/public/Large_button_03.sub') self.ChangeButton.SetEvent(lambda: self.__OnClickConnectButton()) self.ChangeButton.SetText("Wechseln") self.ChangeButton.Show() self.DisableChangeButton() self.ChannelListScrollBar = ui.ScrollBar() self.ChannelListScrollBar.SetParent(self.ChannelListBase) self.ChannelListScrollBar.SetPosition(18, 3) self.ChannelListScrollBar.SetScrollBarSize(83) self.ChannelListScrollBar.SetWindowHorizontalAlignRight() self.ChannelListScrollBar.SetScrollEvent( ui.__mem_func__(self.__OnScrollChannelList)) self.ChannelListScrollBar.Show()