def LoadWindow(self): try: PythonScriptLoader = ui.PythonScriptLoader() PythonScriptLoader.LoadScriptFile(self, "UIScript/battlepass.py") except: import exception exception.Abort("battlepass.LoadWindow.LoadObject") try: self.titleBar = self.GetChild("TitleBar") self.board = self.GetChild("board") self.board_reward = self.GetChild("DesignTop") self.ScrollBar = self.GetChild("ScrollBar") self.info1 = self.GetChild("Text1Info") self.info2 = self.GetChild("Text2Info") self.info3 = self.GetChild("Text3Info") self.info4 = self.GetChild("Text5Info") self.info5 = self.GetChild("Text6Info") self.f_button = self.GetChild("FinalReward") self.ScrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll)) except: import exception exception.Abort("battlepass.__LoadWindow.BindObject") self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close)) self.f_button.SetEvent(lambda : net.SendChatPacket("/final_reward")) self.final_reward = ui.GridSlotWindow() self.final_reward.SetParent(self) self.final_reward.SetPosition(428, 218) self.final_reward.SetSlotStyle(wndMgr.SLOT_STYLE_NONE) self.final_reward.ArrangeSlot(0, 3, 2, 32, 32, 0, 3) self.final_reward.SetOverInItemEvent(ui.__mem_func__(self.OverInItemFinal)) self.final_reward.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) self.final_reward.RefreshSlot() self.final_reward.Show()
def __LoadWindow(self): if self.isLoaded == 1: return self.isLoaded = 1 pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/MallWindow.py") from _weakref import proxy ## Item wndItem = ui.GridSlotWindow() wndItem.SetParent(self) wndItem.SetPosition(8, 35) wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot)) wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot)) wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot)) wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot)) wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem)) wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) wndItem.Show() ## Close Button self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close)) self.GetChild("ExitButton").SetEvent(ui.__mem_func__(self.Close)) self.wndItem = wndItem self.wndBoard = self.GetChild("board") ## Initialize self.SetTableSize(3)
def CreateGridSlotWindow(self, parent, x, y, arrayslot, image): gridslotwindow = ui.GridSlotWindow() gridslotwindow.SetParent(parent) gridslotwindow.SetPosition(x, y) gridslotwindow.ArrangeSlot(arrayslot[0], arrayslot[1], arrayslot[2], arrayslot[3], arrayslot[4], arrayslot[5], arrayslot[6]) wndMgr.SetSlotBaseImage(gridslotwindow.hWnd, image, 1.0, 1.0, 1.0, 1.0) gridslotwindow.Show() return gridslotwindow
def __LoadWindow(self): if self.isLoaded == 1: return self.isLoaded = 1 pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "UIScript/SafeboxWindow.py") from _weakref import proxy ## Item wndItem = ui.GridSlotWindow() wndItem.SetParent(self) wndItem.SetPosition(8, 35) wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot)) wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot)) wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot)) wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot)) wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem)) wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) wndItem.Show() ## PickMoneyDialog import uiPickMoney dlgPickMoney = uiPickMoney.PickMoneyDialog() dlgPickMoney.LoadDialog() dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney)) dlgPickMoney.Hide() ## ChangePasswrod dlgChangePassword = ChangePasswordDialog() dlgChangePassword.LoadDialog() dlgChangePassword.Hide() ## Close Button self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close)) self.GetChild("ChangePasswordButton").SetEvent(ui.__mem_func__(self.OnChangePassword)) self.GetChild("ExitButton").SetEvent(ui.__mem_func__(self.Close)) if app.ENABLE_OFFLINE_SHOP: self.GetChild("CollectButton").SetEvent(ui.__mem_func__(self.OnCollect)) self.GetChild("MyShopsButton").SetEvent(ui.__mem_func__(self.MyShops)) self.wndItem = wndItem self.dlgPickMoney = dlgPickMoney self.dlgChangePassword = dlgChangePassword self.wndBoard = self.GetChild("board") if app.ENABLE_OFFLINE_SHOP: self.wndMoney = self.GetChild("Money") self.wndMoneySlot = self.GetChild("MoneySlot") self.wndMoneySlot.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog)) ## Initialize self.SetTableSize(3) self.RefreshSafeboxMoney()
def __LoadWindow(self): try: PythonScriptLoader = ui.PythonScriptLoader() PythonScriptLoader.LoadScriptFile(self, "UIScript/chestdropwindow.py") except: import exception exception.Abort("ChestDropWindow.__LoadWindow.LoadObject") try: self.titleBar = self.GetChild("TitleBar") self.openItemSlot = self.GetChild("OpenItemSlot") self.openCountController = self.GetChild("OpenCountController") self.openChestButtonSingle = self.GetChild("OpenChestButtonSingle") self.openChestButtonMultiple = self.GetChild( "OpenChestButtonMultiple") self.prevButton = self.GetChild("prev_button") self.nextButton = self.GetChild("next_button") self.currentPageBack = self.GetChild("CurrentPageBack") self.currentPageText = self.GetChild("CurrentPage") except: import exception exception.Abort("ChestDropWindow.__LoadWindow.BindObject") self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close)) self.openCountController.SetEvent( ui.__mem_func__(self.OnChangeOpenAmount)) self.openChestButtonSingle.SetEvent( ui.__mem_func__(self.OnClickOpenChest)) self.openChestButtonMultiple.SetEvent( ui.__mem_func__(self.OnClickOpenChest)) self.SetOpenAmount(1) self.prevButton.SetEvent(ui.__mem_func__(self.OnClickPrevPage)) self.nextButton.SetEvent(ui.__mem_func__(self.OnClickNextPage)) self.currentPageText.SetText(str(self.currentPage)) wndItem = ui.GridSlotWindow() wndItem.SetParent(self) wndItem.SetPosition(8, 35) wndItem.SetSlotStyle(wndMgr.SLOT_STYLE_NONE) wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem)) wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) wndItem.ArrangeSlot(0, 15, 5, 32, 32, 0, 0) wndItem.RefreshSlot() wndItem.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0) wndItem.Show() self.wndItem = wndItem
def LoadWindow(self): self.UI["board"]=ui.BoardWithTitleBar() self.UI["board"].SetSize(500, 320) self.UI["board"].SetTitleName(uiScriptLocale.GIFT_WINDOW_NAME) self.UI["board"].SetCloseEvent(ui.__mem_func__(self.Close)) self.UI["board"].AddFlag("movable") self.UI["board"].Hide() self.UI["slots"] = ui.GridSlotWindow() self.UI["slots"].SetParent(self.UI["board"]) self.UI["slots"].SetPosition(10,30) self.UI["slots"].SetSize(480, 280) self.UI["slots"].ArrangeSlot(0, 15,8, 32, 32, 0, 0) self.UI["slots"].RefreshSlot() self.UI["slots"].SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0) self.UI["slots"].SAFE_SetButtonEvent("LEFT", "EXIST", self.OnSelectItemSlot) self.UI["slots"].SAFE_SetButtonEvent("RIGHT", "EXIST", self.UnselectItemSlot) self.UI["slots"].SetOverInItemEvent(ui.__mem_func__(self.OverInItem)) self.UI["slots"].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem)) self.UI["slots"].Show() Y=self.UI["board"].GetHeight()-30 if POSITION_FIX: Y=self.UI["board"].GetHeight()-43 self.UI["get_button"] = ui.MakeButton(self.UI["board"],250, Y,"","d:/ymir work/ui/public/","large_Button_01.sub","large_Button_02.sub","large_Button_03.sub") self.UI["get_button"].SetText(uiScriptLocale.GIFT_GET_ALL) self.UI["get_button"].SetEvent(lambda : self.GetAll()) self.UI["get_button"].Show() self.UI["pageSlotImage"] = ui.MakeImageBox(self.UI["board"], "d:/ymir work/ui/public/Parameter_Slot_00.sub", self.UI["board"].GetWidth()-110, Y) self.UI["pageSlot"]= ui.MakeTextLine(self.UI["pageSlotImage"]) self.UI["pageSlot"].SetWindowHorizontalAlignCenter() self.UI["pageSlot"].SetHorizontalAlignCenter() self.UI["pageSlot"].SetText(str(self.pageCur)+" - "+str(self.pageNum+1)) self.UI["pageSlot"].Show() ## Prev Button self.UI["prevButton"] = ui.MakeButton(self.UI["board"], self.UI["board"].GetWidth()-160, Y ,uiScriptLocale.GIFT_PREV_PAGE, "d:/ymir work/ui/public/", "small_button_01.sub", "small_button_02.sub", "small_button_03.sub") self.UI["prevButton"].SetText("<<") self.UI["prevButton"].SetEvent(ui.__mem_func__(self.PrepPage), -1) ## Next Button self.UI["nextButton"] = ui.MakeButton(self.UI["board"], self.UI["board"].GetWidth()-65, Y , uiScriptLocale.GIFT_NEXT_PAGE, "d:/ymir work/ui/public/", "small_button_01.sub", "small_button_02.sub", "small_button_03.sub") self.UI["nextButton"].SetText(">>") self.UI["nextButton"].SetEvent(ui.__mem_func__(self.PrepPage), 1) self.AddFlag("movable") self.AddFlag("float") self.SetCenterPosition() self.Show()
def GridSlotWindow(self, parent, ItemInEvent, ItemOutEvent, x, y, width, heigh, SlotStartIndex, SlotXCount, SlotYCount, SlotXStep, SlotYStep, SlotXBlank, SlotYBlank): tmpGridSlotWindow = ui.GridSlotWindow() if parent: tmpGridSlotWindow.SetParent(parent) tmpGridSlotWindow.SetSize(width, heigh) tmpGridSlotWindow.SetPosition(x, y) tmpGridSlotWindow.SetOverInItemEvent(ItemInEvent) tmpGridSlotWindow.SetOverOutItemEvent(ItemOutEvent) tmpGridSlotWindow.ArrangeSlot(SlotStartIndex, SlotXCount, SlotYCount, SlotXStep, SlotYStep, SlotXBlank, SlotYBlank) tmpGridSlotWindow.RefreshSlot() tmpGridSlotWindow.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0) tmpGridSlotWindow.Show() return tmpGridSlotWindow
def AddSlot(self, itemVnum, event): height = len(self.btns) * 40 wndHeight = max(108, 52 + height) self.SetSize(140, wndHeight) self.SetPosition(-126, (wndMgr.GetScreenHeight() - wndHeight) / 2) self.ExpandBtn.SetPosition(126, (wndHeight - 108) / 2) btn = ui.GridSlotWindow() btn.SetParent(self) btn.ArrangeSlot(len(self.btns), 1, 1, 32, 32, 0, 0) btn.SetPosition(80, 15 + height) btn.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip)) btn.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip)) #btn.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot)) btn.SetSelectItemSlotEvent(event) btn.Show() btn.SetItemSlot(len(self.btns), itemVnum, 0) self.itemVnums.append(itemVnum) self.btns.append(btn)
def LoadUI(self): settinginfo.BoxOpenerOpen = 1 self.Board = ui.BoardWithTitleBar() self.Board.SetSize(266, 405) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Truhen öffnen.") self.Board.SetCloseEvent(self.__del__) self.Board.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() self.OpenBoxThinBoardBG = ui.ImageBox() self.OpenBoxThinBoardBG.SetParent(self.Board) self.OpenBoxThinBoardBG.SetPosition(15,35) self.OpenBoxThinBoardBG.LoadImage("images_jewel/box_bg.tga") self.OpenBoxThinBoardBG.Show() self.OpenBoxThinBoard = ui.ThinBoard() self.OpenBoxThinBoard.SetParent(self.Board) self.OpenBoxThinBoard.SetSize(236,110) self.OpenBoxThinBoard.SetPosition(15,35) self.OpenBoxThinBoard.Show() self.OpenBoxInstruction = ui.TextLine() self.OpenBoxInstruction.SetParent(self.Board) self.OpenBoxInstruction.SetText("Bitte lege die zu öffnenden Truhen in den Slot.") self.OpenBoxInstruction.SetPosition(133,45) self.OpenBoxInstruction.SetHorizontalAlignCenter() self.OpenBoxInstruction.Show() self.OpenBoxRedSlotImg = ui.ImageBox() self.OpenBoxRedSlotImg.SetParent(self.Board) self.OpenBoxRedSlotImg.SetPosition(113,70) self.OpenBoxRedSlotImg.LoadImage("images_jewel/red_slot.tga") self.OpenBoxRedSlotImg.Show() self.OpenBoxSlot = ui.GridSlotWindow() self.OpenBoxSlot.SetParent(self.OpenBoxRedSlotImg) self.OpenBoxSlot.ArrangeSlot(50,1,1,32,32,0,0) self.OpenBoxSlot.SetPosition(4, 4) self.OpenBoxSlot.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip)) self.OpenBoxSlot.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip)) self.OpenBoxSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot)) self.OpenBoxSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.del_slot)) self.OpenBoxSlot.Show() self.OpenBoxButton = ui.Button() self.OpenBoxButton.SetParent(self.Board) self.OpenBoxButton.SetPosition(90,115) self.OpenBoxButton.SetText("") self.OpenBoxButton.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub") self.OpenBoxButton.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub") self.OpenBoxButton.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub") self.OpenBoxButton.SetEvent(self.OpenBOXCMD) self.OpenBoxButton.Show() self.OpenBoxButtonText = ui.TextLine() self.OpenBoxButtonText.SetParent(self.Board) self.OpenBoxButtonText.SetText("Alle öffnen!") self.OpenBoxButtonText.SetPosition(133,118) self.OpenBoxButtonText.SetHorizontalAlignCenter() self.OpenBoxButtonText.Show() self.OtherBoxTitleBar = ui.HorizontalBar() self.OtherBoxTitleBar.SetParent(self.Board) self.OtherBoxTitleBar.Create(235) self.OtherBoxTitleBar.SetPosition(16,150) self.OtherBoxTitleBar.Show() self.OtherBoxTitle = ui.TextLine() self.OtherBoxTitle.SetParent(self.Board) self.OtherBoxTitle.SetText("Truhen die hier geöffnet werden können.") self.OtherBoxTitle.SetPosition(133,150) self.OtherBoxTitle.SetHorizontalAlignCenter() self.OtherBoxTitle.Show() i = 0 count_line = 0 next_line = 6 slot_count = 42 width = 30 height = 170 treasureBoxVnums = settinginfo.treasure_chest_vnum treasureBoxVnumsCount = len(treasureBoxVnums) - 1 while i < slot_count: self.slotImages[i] = ui.ImageBox() self.slotImages[i].SetParent(self.Board) self.slotImages[i].SetPosition(width,height) self.slotImages[i].LoadImage("d:/ymir work/ui/public/slot_base.sub") self.slotImages[i].Show() self.otherBoxSlots[i] = ui.GridSlotWindow() self.otherBoxSlots[i].SetParent(self.slotImages[i]) self.otherBoxSlots[i].ArrangeSlot(i,1,1,32,32,0,0) self.otherBoxSlots[i].SetPosition(0, 0) self.otherBoxSlots[i].SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip)) self.otherBoxSlots[i].SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip)) self.otherBoxSlots[i].SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot)) self.otherBoxSlots[i].SetSelectItemSlotEvent(ui.__mem_func__(self.del_slot)) self.otherBoxSlots[i].Show() if treasureBoxVnumsCount >= i: self.otherBoxSlots[i].SetItemSlot(i, treasureBoxVnums[i], 0) width = width + 35 count_line = count_line + 1 if count_line == next_line: width = 30 height = height + 32 count_line = 0 i = i + 1
def LoadUI(self): self.Board = ui.BoardWithTitleBar() self.Board.SetSize(190, 330) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Multishop") self.Board.SetCloseEvent(self.closeX) self.Board.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() i = 0 line_width = 5 line_height = 8 line_width_count = 0 line_height_count = 0 start_height = 35 start_width = 15 max_slots = 40 while i < max_slots: self.slotImages[i] = ui.ImageBox() self.slotImages[i].SetParent(self.Board) self.slotImages[i].SetPosition(start_width, start_height) self.slotImages[i].LoadImage( "d:/ymir work/ui/public/slot_base.sub") self.slotImages[i].Show() self.DevSlotNumbers[i] = ui.TextLine() self.DevSlotNumbers[i].SetParent(self.slotImages[i]) self.DevSlotNumbers[i].SetPosition(16, 16) self.DevSlotNumbers[i].SetText(str(i)) self.DevSlotNumbers[i].SetHorizontalAlignRight() if self.showDevSlotNumbers == 1: self.DevSlotNumbers[i].Show() start_width = start_width + 32 line_width_count = line_width_count + 1 if line_width_count == line_width: start_width = 15 start_height = start_height + 32 line_width_count = 0 i = i + 1 self.CurrencyIcon = ui.ImageBox() self.CurrencyIcon.SetParent(self.Board) self.CurrencyIcon.SetPosition(20, 296) self.CurrencyIcon.LoadImage("d:/ymir work/ui/daily.dds") self.CurrencyIcon.Show() self.CurrencyBG = ui.ImageBox() self.CurrencyBG.SetParent(self.Board) self.CurrencyBG.SetPosition(40, 295) self.CurrencyBG.LoadImage( "d:/ymir work/ui/public/parameter_slot_05.sub") self.CurrencyBG.Show() self.CurrencyTextLine = ui.TextLine() self.CurrencyTextLine.SetParent(self.Board) self.CurrencyTextLine.SetPosition(164, 297) self.CurrencyTextLine.SetText("") self.CurrencyTextLine.SetHorizontalAlignRight() self.CurrencyTextLine.Show() self.itemSlots = ui.GridSlotWindow() self.itemSlots.SetParent(self.Board) self.itemSlots.ArrangeSlot(0, 5, 8, 32, 32, 0, 0) self.itemSlots.SetPosition(15, 35) self.itemSlots.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip)) self.itemSlots.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip)) self.itemSlots.SetSelectItemSlotEvent(ui.__mem_func__(self.BuyItem)) self.itemSlots.SAFE_SetButtonEvent("RIGHT", "ALWAYS", self.BuyItem) self.itemSlots.Show() self.itemBuyQuestionDialog = None self.Board.Hide()
def LoadUI(self): if self.gui == 1: self.gui = 2 self.Board.Show() self.LoadCategory(0) elif self.gui == 2: self.gui = 1 self.Board.Hide() else: self.gui = 1 self.Board = ui.BoardWithTitleBar() self.Board.SetSize(700, 505) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Dungeonkompendium ~ Bruthöhle") self.Board.SetCloseEvent(self.CloseX) self.Board.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() self.NavBoard = ui.ThinBoard() self.NavBoard.SetParent(self.Board) self.NavBoard.SetPosition(15, 35) self.NavBoard.SetSize(200, 455) self.NavBoard.Show() self.NavBG = ui.ImageBox() self.NavBG.SetParent(self.Board) self.NavBG.SetPosition(220, 35) self.NavBG.LoadImage( "images_dungeon/dungeonkompendium_header/dungeon_bluedead.tga") self.NavBG.Show() self.HeaderBGThinBoard = ui.ThinBoard() self.HeaderBGThinBoard.SetParent(self.Board) self.HeaderBGThinBoard.SetPosition(220, 35) self.HeaderBGThinBoard.SetSize(465, 70) self.HeaderBGThinBoard.Show() self.ReqThinBoard = ui.ThinBoard() self.ReqThinBoard.SetParent(self.Board) self.ReqThinBoard.SetPosition(220, 110) self.ReqThinBoard.SetSize(465, 50) self.ReqThinBoard.Show() self.MinLevelTextLineTitle = ui.TextLine() self.MinLevelTextLineTitle.SetParent(self.ReqThinBoard) self.MinLevelTextLineTitle.SetPosition(12, 8) self.MinLevelTextLineTitle.SetText("Ab Level: ") self.MinLevelTextLineTitle.Show() self.MinLevelTextLine = ui.TextLine() self.MinLevelTextLine.SetParent(self.ReqThinBoard) self.MinLevelTextLine.SetPosition(80, 8) self.MinLevelTextLine.SetText("125") self.MinLevelTextLine.Show() self.ItemTextLineTitle = ui.TextLine() self.ItemTextLineTitle.SetParent(self.ReqThinBoard) self.ItemTextLineTitle.SetPosition(12, 25) self.ItemTextLineTitle.SetText("Gegenstand: ") self.ItemTextLineTitle.Show() self.ItemTextLine = ui.TextLine() self.ItemTextLine.SetParent(self.ReqThinBoard) self.ItemTextLine.SetPosition(80, 25) self.ItemTextLine.SetText("Arachnidenschlüssel") self.ItemTextLine.Show() self.GroupTextLineTitle = ui.TextLine() self.GroupTextLineTitle.SetParent(self.ReqThinBoard) self.GroupTextLineTitle.SetPosition(200, 8) self.GroupTextLineTitle.SetText("Gruppe benötigt: ") self.GroupTextLineTitle.Show() self.GroupTextLine = ui.TextLine() self.GroupTextLine.SetParent(self.ReqThinBoard) self.GroupTextLine.SetPosition(290, 8) self.GroupTextLine.SetText("Nein") self.GroupTextLine.Show() self.TimeTextLineTitle = ui.TextLine() self.TimeTextLineTitle.SetParent(self.ReqThinBoard) self.TimeTextLineTitle.SetPosition(200, 25) self.TimeTextLineTitle.SetText("Wartezeit: ") self.TimeTextLineTitle.Show() self.TimeTextLine = ui.TextLine() self.TimeTextLine.SetParent(self.ReqThinBoard) self.TimeTextLine.SetPosition(290, 25) self.TimeTextLine.SetText("00:00:00 Sek.") self.TimeTextLine.Show() self.ContentThinBoard = ui.ThinBoard() self.ContentThinBoard.SetParent(self.Board) self.ContentThinBoard.SetPosition(220, 165) self.ContentThinBoard.SetSize(465, 270) self.ContentThinBoard.Show() i = 0 x = 8 # max. 88 while i < 17: self.ContentTextLines[i] = ui.TextLine() self.ContentTextLines[i].SetParent(self.ContentThinBoard) self.ContentTextLines[i].SetPosition(233, x) self.ContentTextLines[i].SetHorizontalAlignCenter() self.ContentTextLines[i].SetText("") self.ContentTextLines[i].Show() x = x + 15 i = i + 1 self.InfoThinBoard = ui.ThinBoard() self.InfoThinBoard.SetParent(self.Board) self.InfoThinBoard.SetPosition(220, 440) self.InfoThinBoard.SetSize(465, 50) self.InfoThinBoard.Show() i = 0 y = 8 while i < 14: self.BossItemSlots[i] = ui.GridSlotWindow() self.BossItemSlots[i].SetParent(self.InfoThinBoard) self.BossItemSlots[i].ArrangeSlot(i, 1, 1, 32, 32, 0, 0) self.BossItemSlots[i].SetPosition(y, 8) self.BossItemSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.BossItemSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.BossItemSlots[i].SetSelectItemSlotEvent( ui.__mem_func__(self.WarpToDungeon)) self.BossItemSlots[i].Show() y = y + 32 i = i + 1 i = 0 x = 8 while i < len(settinginfo.DungeonMainSettings): self.NavButtons[i] = ui.Button() self.NavButtons[i].SetParent(self.NavBoard) self.NavButtons[i].SetPosition(10, x) self.NavButtons[i].SetText("") self.NavButtons[i].SetUpVisual( "d:/ymir work/ui/public/xlarge_button_01.sub") self.NavButtons[i].SetOverVisual( "d:/ymir work/ui/public/xlarge_button_02.sub") self.NavButtons[i].SetDownVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.NavButtons[i].SetEvent(ui.__mem_func__(self.LoadCategory), i) self.NavButtons[i].Show() self.NavButtonsTitles[i] = ui.TextLine() self.NavButtonsTitles[i].SetParent(self.NavBoard) self.NavButtonsTitles[i].SetPosition(100, x + 6) self.NavButtonsTitles[i].SetText( settinginfo.DungeonMainSettings[i][0][0]) self.NavButtonsTitles[i].SetHorizontalAlignCenter() self.NavButtonsTitles[i].Show() i = i + 1 x = x + 30 self.LoadCategory(0) self.Board.Hide()
def LoadUI(self): constInfo.warpgui_open = 1 self.Board = ui.BoardWithTitleBar() self.Board.SetSize(700, 350) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Teleportation") self.Board.SetCloseEvent(self.__del__) self.Board.Show() self.NavThinBoard = ui.ThinBoard() self.NavThinBoard.SetParent(self.Board) self.NavThinBoard.SetPosition(15, 35) self.NavThinBoard.SetSize(110, 305) self.NavThinBoard.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() i = 0 nb_height = 10 while i < len(warps): self.NavButtons[i] = ui.Button() self.NavButtons[i].SetParent(self.NavThinBoard) self.NavButtons[i].SetPosition(10, nb_height) self.NavButtons[i].SetText("") self.NavButtons[i].SetUpVisual( "d:/ymir work/ui/public/Large_Button_01.sub") self.NavButtons[i].SetOverVisual( "d:/ymir work/ui/public/Large_Button_02.sub") self.NavButtons[i].SetDownVisual( "d:/ymir work/ui/public/Large_Button_03.sub") self.NavButtons[i].SetEvent(ui.__mem_func__(self.LoadCategory), i) self.NavButtons[i].Show() self.NavButtonTitles[i] = ui.TextLine() self.NavButtonTitles[i].SetParent(self.NavButtons[i]) self.NavButtonTitles[i].SetPosition(43, 2) self.NavButtonTitles[i].SetText(str(warps[i][0][0])) self.NavButtonTitles[i].SetHorizontalAlignCenter() self.NavButtonTitles[i].Show() i = i + 1 nb_height = nb_height + 22 step = 5 i = 1 aIndex = 0 wtb_width = 130 wtb_height = 35 player_level = fgGHGjjFHJghjfFG1545gGG.GetStatus( fgGHGjjFHJghjfFG1545gGG.LEVEL) while i <= board_count: self.WarpBGImages[i] = ui.ImageBox() self.WarpBGImages[i].SetParent(self.Board) self.WarpBGImages[i].SetPosition(wtb_width, wtb_height) self.WarpBGImages[i].LoadImage("images_warpgui/map/map_0_0.tga") self.WarpBGImages[i].Show() self.WarpThinBoards[i] = ui.ThinBoard() self.WarpThinBoards[i].SetParent(self.WarpBGImages[i]) self.WarpThinBoards[i].SetSize(130, 150) self.WarpThinBoards[i].SetPosition(0, 0) self.WarpThinBoards[i].Show() self.WarpMapNames[i] = ui.TextLine() self.WarpMapNames[i].SetParent(self.WarpThinBoards[i]) self.WarpMapNames[i].SetPosition(65, 8) self.WarpMapNames[i].SetText("MapName") self.WarpMapNames[i].SetHorizontalAlignCenter() self.WarpMapNames[i].Show() self.WarpTitleUnderLines[i] = ui.ImageBox() self.WarpTitleUnderLines[i].SetParent(self.WarpThinBoards[i]) self.WarpTitleUnderLines[i].SetPosition(5, 25) self.WarpTitleUnderLines[i].LoadImage( "images_warpgui/title_underline.tga") self.WarpTitleUnderLines[i].Show() self.WarpButtons[i] = ui.Button() self.WarpButtons[i].SetParent(self.WarpThinBoards[i]) self.WarpButtons[i].SetPosition(22, 125) self.WarpButtons[i].SetText("") self.WarpButtons[i].SetUpVisual( "d:/ymir work/ui/public/Large_Button_01.sub") self.WarpButtons[i].SetOverVisual( "d:/ymir work/ui/public/Large_Button_02.sub") self.WarpButtons[i].SetDownVisual( "d:/ymir work/ui/public/Large_Button_03.sub") self.WarpButtons[i].SetEvent(ui.__mem_func__(self.SendWarpPacket), i) self.WarpButtons[i].Show() self.WarpButtonTitles[i] = ui.TextLine() self.WarpButtonTitles[i].SetParent(self.WarpButtons[i]) self.WarpButtonTitles[i].SetPosition(43, 2) self.WarpButtonTitles[i].SetText("Teleportieren") self.WarpButtonTitles[i].SetHorizontalAlignCenter() self.WarpButtonTitles[i].Show() self.WarpErrors[i] = ui.TextLine() self.WarpErrors[i].SetParent(self.WarpThinBoards[i]) self.WarpErrors[i].SetPosition(65, 125) self.WarpErrors[i].SetText("[ Ab lv. ]") self.WarpErrors[i].SetHorizontalAlignCenter() self.WarpErrors[i].Show() self.WarpItemSlots[i] = ui.GridSlotWindow() self.WarpItemSlots[i].SetParent(self.WarpThinBoards[i]) self.WarpItemSlots[i].ArrangeSlot(i, 1, 1, 32, 32, 0, 0) self.WarpItemSlots[i].SetPosition(49, 75) self.WarpItemSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.WarpItemSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.WarpItemSlots[i].Show() # self.WarpItemSlots[i].SetItemSlot(0,27001,1) self.WarpClosed[i] = ui.TextLine() self.WarpClosed[i].SetParent(self.WarpThinBoards[i]) self.WarpClosed[i].SetPosition(65, 95) self.WarpClosed[i].SetText("[ Geschlossen! ]") self.WarpClosed[i].SetHorizontalAlignCenter() self.WarpClosed[i].Hide() aIndex = aIndex + 1 i = i + 1 wtb_width = wtb_width + 135 if i == step: wtb_width = 130 wtb_height = 190 self.scrollbar = ui.ScrollBar() self.scrollbar.SetParent(self.Board) self.scrollbar.SetScrollBarSize(305) self.scrollbar.SetPosition(670, 35) self.scrollbar.SetMiddleBarSize(float(board_count) / float(8)) self.scrollbar.SetScrollEvent(self.__OnScroll) self.scrollbar.Show() self.LoadCategory(0)
def LoadUI(self): settinginfo.SchmiedehandbuchOpen = 1 self.Board = ui.BoardWithRoofBar() self.Board.SetSize(700, 450) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") # self.Board.SetTitleName("Schmiedehandbuch") self.Board.SetCloseEvent(self.Open) self.Board.Hide() ############################################################ ## Navigation self.NavBoard = ui.Board() self.NavBoard.SetParent(self.Board) self.NavBoard.SetPosition(15, 65) self.NavBoard.SetSize(210, 485) self.NavBoard.HideBottom() self.NavBoard.Show() self.ForgeGuideBoard = ui.Board() self.ForgeGuideBoard.SetParent(self.Board) self.ForgeGuideBoard.SetPosition(15, 65) self.ForgeGuideBoard.SetSize(210, 485) self.ForgeGuideBoard.HideBottom() self.ForgeGuideBoard.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() i = 0 x = 12 button_x = 19 while i < len(settinginfo.SchmiedeHandBuchInfos[0]): self.itemTypeButtons[i] = ui.Button() self.itemTypeButtons[i].SetParent(self.NavBoard) self.itemTypeButtons[i].SetPosition(25, x) self.itemTypeButtons[i].SetText("") self.itemTypeButtons[i].SetUpVisual( "yamato_helpboard/wide_button_n.tga") self.itemTypeButtons[i].SetOverVisual( "yamato_helpboard/wide_button_h.tga") self.itemTypeButtons[i].SetDownVisual( "yamato_helpboard/wide_button_p.tga") self.itemTypeButtons[i].SetDisableVisual( "yamato_helpboard/wide_button_d.tga") self.itemTypeButtons[i].SetEvent( ui.__mem_func__(self.LoadCategory), i) self.itemTypeButtons[i].Show() self.ButtonTitles[i] = ui.TextLine() self.ButtonTitles[i].SetParent(self.NavBoard) self.ButtonTitles[i].SetPosition(105, button_x) self.ButtonTitles[i].SetHorizontalAlignCenter() self.ButtonTitles[i].SetText( settinginfo.SchmiedeHandBuchInfos[0][i][0][0]) self.ButtonTitles[i].Show() button_x = button_x + 30 i = i + 1 x = x + 30 self.ForgeGuideBoard = ui.Board() self.ForgeGuideBoard.SetParent(self.Board) self.ForgeGuideBoard.SetPosition(15, x + 65) self.ForgeGuideBoard.SetSize(210, 80) self.ForgeGuideBoard.HideBottom() self.ForgeGuideBoard.Show() self.ForgeGuidePVM = ui.Button() self.ForgeGuidePVM.SetParent(self.ForgeGuideBoard) self.ForgeGuidePVM.SetPosition(25, 15) self.ForgeGuidePVM.SetUpVisual("yamato_helpboard/wide_button_n.tga") self.ForgeGuidePVM.SetOverVisual("yamato_helpboard/wide_button_h.tga") self.ForgeGuidePVM.SetDownVisual("yamato_helpboard/wide_button_p.tga") self.ForgeGuidePVM.SetDisableVisual( "yamato_helpboard/wide_button_d.tga") self.ForgeGuidePVM.SetEvent(ui.__mem_func__(self.LoadForgeGuide), 0) self.ForgeGuidePVM.Show() self.ForgeGuidePVP = ui.Button() self.ForgeGuidePVP.SetParent(self.ForgeGuideBoard) self.ForgeGuidePVP.SetPosition(25, 45) self.ForgeGuidePVP.SetUpVisual("yamato_helpboard/wide_button_n.tga") self.ForgeGuidePVP.SetOverVisual("yamato_helpboard/wide_button_h.tga") self.ForgeGuidePVP.SetDownVisual("yamato_helpboard/wide_button_p.tga") self.ForgeGuidePVP.SetDisableVisual( "yamato_helpboard/wide_button_d.tga") self.ForgeGuidePVP.SetEvent(ui.__mem_func__(self.LoadForgeGuide), 1) self.ForgeGuidePVP.Show() self.ForgeGuidePVMTextLine = ui.TextLine() self.ForgeGuidePVMTextLine.SetParent(self.ForgeGuideBoard) self.ForgeGuidePVMTextLine.SetPosition(105, 15 + 6) self.ForgeGuidePVMTextLine.SetHorizontalAlignCenter() self.ForgeGuidePVMTextLine.SetText("PVM") self.ForgeGuidePVMTextLine.Show() self.ForgeGuidePVPTextLine = ui.TextLine() self.ForgeGuidePVPTextLine.SetParent(self.ForgeGuideBoard) self.ForgeGuidePVPTextLine.SetPosition(105, 45 + 6) self.ForgeGuidePVPTextLine.SetHorizontalAlignCenter() self.ForgeGuidePVPTextLine.SetText("PVP") self.ForgeGuidePVPTextLine.Show() ############################################################ ## Content self.ForgeGuideTitleBoard = ui.Board() self.ForgeGuideTitleBoard.SetParent(self.Board) self.ForgeGuideTitleBoard.SetPosition(205, 65) self.ForgeGuideTitleBoard.SetSize(515, 80) self.ForgeGuideTitleBoard.HideBottom() self.ForgeGuideTitleBoard.Show() self.ForgeGuideBGBoard = ui.Board() self.ForgeGuideBGBoard.SetParent(self.Board) self.ForgeGuideBGBoard.SetPosition(205, 110) self.ForgeGuideBGBoard.SetSize(515, 440) self.ForgeGuideBGBoard.HideBottom() self.ForgeGuideBGBoard.Show() self.ForgeGuideTitleTextLine = ui.TextLine() self.ForgeGuideTitleTextLine.SetParent(self.ForgeGuideTitleBoard) self.ForgeGuideTitleTextLine.SetPosition(257, 20) self.ForgeGuideTitleTextLine.SetHorizontalAlignCenter() self.ForgeGuideTitleTextLine.SetText("Schmiedehandbuch - PVM") self.ForgeGuideTitleTextLine.SetPackedFontColor(0xffd8a055) self.ForgeGuideTitleTextLine.Show() i = 0 x = 120 trennstrichCounter = 0 uppitemslots = 0 while i < 3: self.itemBoards[i] = ui.ImageBox() self.itemBoards[i].SetParent(self.Board) self.itemBoards[i].SetPosition(240 - 15, x) self.itemBoards[i].LoadImage( "yamato_forgeguide/forge_guide_bg.tga") self.itemBoards[i].Show() self.itemMainSlots[i] = ui.GridSlotWindow() self.itemMainSlots[i].SetParent(self.itemBoards[i]) self.itemMainSlots[i].ArrangeSlot(i, 1, 1, 32, 96, 0, 0) self.itemMainSlots[i].SetPosition(8, 20) self.itemMainSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTipEmpty)) self.itemMainSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTipEmpty)) self.itemMainSlots[i].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slotEmpty)) self.itemMainSlots[i].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slotEmpty)) self.itemMainSlots[i].Show() trenn_y = 40 for t in xrange(10): self.Trennstriche[trennstrichCounter] = ui.ImageBox() self.Trennstriche[trennstrichCounter].SetParent( self.itemBoards[i]) self.Trennstriche[trennstrichCounter].SetPosition(trenn_y, 20) self.Trennstriche[trennstrichCounter].LoadImage( "yamato_forgeguide/split.tga") self.Trennstriche[trennstrichCounter].Show() trenn_y = trenn_y + 45 trennstrichCounter = trennstrichCounter + 1 self.UppStufenHeadline[i] = ui.TextLine() self.UppStufenHeadline[i].SetParent(self.itemBoards[i]) self.UppStufenHeadline[i].SetPosition(45, 5) self.UppStufenHeadline[i].SetText( " +1 +2 +3 +4 +5 +6 +7 +8 +9" ) self.UppStufenHeadline[i].Show() y_slot = 47 for t in xrange(9): x_slot = 20 for z in xrange(3): self.UppItemsSlots[uppitemslots] = ui.GridSlotWindow() self.UppItemsSlots[uppitemslots].SetParent( self.itemBoards[i]) self.UppItemsSlots[uppitemslots].ArrangeSlot( uppitemslots, 1, 1, 32, 32, 0, 0) self.UppItemsSlots[uppitemslots].SetPosition( y_slot, x_slot) self.UppItemsSlots[uppitemslots].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.UppItemsSlots[uppitemslots].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.UppItemsSlots[uppitemslots].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slot)) self.UppItemsSlots[uppitemslots].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slot)) self.UppItemsSlots[uppitemslots].Show() uppitemslots = uppitemslots + 1 x_slot = x_slot + 32 if z == 2: y_slot = y_slot + 45 i = i + 1 x = x + 132 self.scrollbar = ui.ScrollBar() self.scrollbar.SetParent(self.Board) self.scrollbar.SetScrollBarSize(395) self.scrollbar.SetPosition(675 + 10, 120) self.scrollbar.SetMiddleBarSize( float(board_count) / float( len(settinginfo.SchmiedeHandBuchInfos[self.ForgeGuide][ self.Category][1]))) self.scrollbar.SetScrollEvent(self.__OnScroll) self.scrollbar.Show() self.LoadForgeGuide(0) self.LoadCategory(0)
def LoadUI(self): settinginfo.DailyQuest_GUI = 1 self.Board = ui.BoardWithTitleBar() self.Board.SetSize(266, 340) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Daily-Quest") self.Board.SetCloseEvent(self.__del__) self.Board.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() self.TimeThinBoard = ui.ThinBoard() self.TimeThinBoard.SetParent(self.Board) self.TimeThinBoard.SetPosition(16, 35) self.TimeThinBoard.SetSize(235, 60) self.TimeThinBoard.Show() self.TitleBar = ui.HorizontalBar() self.TitleBar.SetParent(self.Board) self.TitleBar.Create(235) self.TitleBar.SetPosition(16, 35) self.TitleBar.Show() self.TitleBarTitle = ui.TextLine() self.TitleBarTitle.SetParent(self.Board) self.TitleBarTitle.SetPosition(133, 36) self.TitleBarTitle.SetHorizontalAlignCenter() self.TitleBarTitle.SetText("Zeit") self.TitleBarTitle.Show() self.MainTimeLine = ui.TextLine() self.MainTimeLine.SetParent(self.Board) self.MainTimeLine.SetPosition(133, 65) self.MainTimeLine.SetHorizontalAlignCenter() self.MainTimeLine.SetText("[ Verbl. Zeit: 13:59:57 Std. ]") self.MainTimeLine.SetFontColor(0.5411, 0.7254, 0.5568) self.MainTimeLine.Show() self.TargetThinBoard = ui.ThinBoard() self.TargetThinBoard.SetParent(self.Board) self.TargetThinBoard.SetPosition(16, 100) self.TargetThinBoard.SetSize(235, 65) self.TargetThinBoard.Show() self.TargetTitleBar = ui.HorizontalBar() self.TargetTitleBar.SetParent(self.Board) self.TargetTitleBar.Create(235) self.TargetTitleBar.SetPosition(16, 100) self.TargetTitleBar.Show() self.TargetTitle = ui.TextLine() self.TargetTitle.SetParent(self.Board) self.TargetTitle.SetPosition(133, 101) self.TargetTitle.SetHorizontalAlignCenter() self.TargetTitle.SetText("Ziel(e)") self.TargetTitle.Show() i = 0 slot_count = 6 width = 37 while i < slot_count: self.slotImages[i] = ui.ImageBox() self.slotImages[i].SetParent(self.Board) self.slotImages[i].SetPosition(width, 120) self.slotImages[i].LoadImage( "d:/ymir work/ui/public/slot_base.sub") self.slotImages[i].Show() self.targetSlots[i] = ui.GridSlotWindow() self.targetSlots[i].SetParent(self.slotImages[i]) self.targetSlots[i].ArrangeSlot(i, 1, 1, 32, 32, 0, 0) self.targetSlots[i].SetPosition(0, 0) self.targetSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.targetSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.targetSlots[i].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slot)) self.targetSlots[i].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slot)) self.targetSlots[i].Show() width = width + 32 i = i + 1 self.rewardThinBoard = ui.ThinBoard() self.rewardThinBoard.SetParent(self.Board) self.rewardThinBoard.SetPosition(16, 170) self.rewardThinBoard.SetSize(235, 65) self.rewardThinBoard.Show() self.rewardTitleBar = ui.HorizontalBar() self.rewardTitleBar.SetParent(self.Board) self.rewardTitleBar.Create(235) self.rewardTitleBar.SetPosition(16, 170) self.rewardTitleBar.Show() self.rewardTitle = ui.TextLine() self.rewardTitle.SetParent(self.Board) self.rewardTitle.SetPosition(133, 171) self.rewardTitle.SetHorizontalAlignCenter() self.rewardTitle.SetText("Belohnung") self.rewardTitle.Show() i = 0 slot_count = 6 width = 37 slot_idx = 7 while i < slot_count: self.rewardSlotImages[i] = ui.ImageBox() self.rewardSlotImages[i].SetParent(self.Board) self.rewardSlotImages[i].SetPosition(width, 190) self.rewardSlotImages[i].LoadImage( "d:/ymir work/ui/public/slot_base.sub") self.rewardSlotImages[i].Show() self.rewardSlots[i] = ui.GridSlotWindow() self.rewardSlots[i].SetParent(self.rewardSlotImages[i]) self.rewardSlots[i].ArrangeSlot(slot_idx, 1, 1, 32, 32, 0, 0) self.rewardSlots[i].SetPosition(0, 0) self.rewardSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.rewardSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.rewardSlots[i].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slot)) self.rewardSlots[i].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slot)) self.rewardSlots[i].Show() slot_idx = slot_idx + 1 width = width + 32 i = i + 1 self.startThinBoard = ui.ThinBoard() self.startThinBoard.SetParent(self.Board) self.startThinBoard.SetPosition(16, 240) self.startThinBoard.SetSize(235, 85) self.startThinBoard.Show() self.startTitleBar = ui.HorizontalBar() self.startTitleBar.SetParent(self.Board) self.startTitleBar.Create(235) self.startTitleBar.SetPosition(16, 240) self.startTitleBar.Show() self.startTitle = ui.TextLine() self.startTitle.SetParent(self.Board) self.startTitle.SetPosition(133, 241) self.startTitle.SetHorizontalAlignCenter() self.startTitle.SetText("Quest starten") self.startTitle.Show() self.startButton = ui.Button() self.startButton.SetParent(self.Board) self.startButton.SetPosition(40, 270) self.startButton.SetText("") self.startButton.SetUpVisual( "d:/ymir work/ui/public/xlarge_button_01.sub") self.startButton.SetOverVisual( "d:/ymir work/ui/public/xlarge_button_02.sub") self.startButton.SetDownVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.startButton.SetEvent(self.StartQuest) self.startButton.Show() self.disStartButton = ui.Button() self.disStartButton.SetParent(self.Board) self.disStartButton.SetPosition(40, 270) self.disStartButton.SetText("") self.disStartButton.SetUpVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.disStartButton.SetOverVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.disStartButton.SetDownVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.disStartButton.SetEvent(self.disButtonFunc) self.disStartButton.Hide() self.startButtonTitle = ui.TextLine() self.startButtonTitle.SetParent(self.Board) self.startButtonTitle.SetPosition(133, 276) self.startButtonTitle.SetHorizontalAlignCenter() self.startButtonTitle.SetText("Starten!") self.startButtonTitle.Show()
def LoadUI(self): settinginfo.SchmiedehandbuchPVPOpen = 1 self.Board = ui.BoardWithTitleBar() self.Board.SetSize(700, 450) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.SetTitleName("Schmiedehandbuch") self.Board.SetCloseEvent(self.__del__) self.Board.Show() ############################################################ ## Navigation self.NavBoard = ui.ThinBoard() self.NavBoard.SetParent(self.Board) self.NavBoard.SetPosition(15, 35) self.NavBoard.SetSize(200, 400) self.NavBoard.Show() self.itemtooltip = uiToolTip.ItemToolTip() self.itemtooltip.HideToolTip() i = 0 x = 8 button_x = 15 while i < len(settinginfo.SchmiedeHandBuchInfosPVP): self.itemTypeButtons[i] = ui.Button() self.itemTypeButtons[i].SetParent(self.NavBoard) self.itemTypeButtons[i].SetPosition(10, x) self.itemTypeButtons[i].SetText("") self.itemTypeButtons[i].SetUpVisual( "d:/ymir work/ui/public/xlarge_button_01.sub") self.itemTypeButtons[i].SetOverVisual( "d:/ymir work/ui/public/xlarge_button_02.sub") self.itemTypeButtons[i].SetDownVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.itemTypeButtons[i].SetEvent( ui.__mem_func__(self.LoadCategory), i) self.itemTypeButtons[i].Show() self.ButtonTitles[i] = ui.TextLine() self.ButtonTitles[i].SetParent(self.NavBoard) self.ButtonTitles[i].SetPosition(100, button_x) self.ButtonTitles[i].SetHorizontalAlignCenter() self.ButtonTitles[i].SetText( settinginfo.SchmiedeHandBuchInfosPVP[i][0][0]) self.ButtonTitles[i].Show() button_x = button_x + 30 i = i + 1 x = x + 30 ############################################################ ## Content i = 0 x = 35 trennstrichCounter = 0 uppitemslots = 0 while i < 3: self.itemBoards[i] = ui.ThinBoard() self.itemBoards[i].SetParent(self.Board) self.itemBoards[i].SetPosition(220, x) self.itemBoards[i].SetSize(455, 130) self.itemBoards[i].Show() self.itemMainSlots[i] = ui.GridSlotWindow() self.itemMainSlots[i].SetParent(self.itemBoards[i]) self.itemMainSlots[i].ArrangeSlot(i, 1, 1, 32, 96, 0, 0) self.itemMainSlots[i].SetPosition(8, 20) self.itemMainSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTipEmpty)) self.itemMainSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTipEmpty)) self.itemMainSlots[i].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slotEmpty)) self.itemMainSlots[i].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slotEmpty)) self.itemMainSlots[i].Show() trenn_y = 40 for t in xrange(10): self.Trennstriche[trennstrichCounter] = ui.ImageBox() self.Trennstriche[trennstrichCounter].SetParent( self.itemBoards[i]) self.Trennstriche[trennstrichCounter].SetPosition(trenn_y, 20) self.Trennstriche[trennstrichCounter].LoadImage( "d:/ymir work/ui/schmiedehandbuch_images/trennstrich.tga") self.Trennstriche[trennstrichCounter].Show() trenn_y = trenn_y + 45 trennstrichCounter = trennstrichCounter + 1 self.UppStufenHeadline[i] = ui.TextLine() self.UppStufenHeadline[i].SetParent(self.itemBoards[i]) self.UppStufenHeadline[i].SetPosition(45, 5) self.UppStufenHeadline[i].SetText( " +1 +2 +3 +4 +5 +6 +7 +8 +9" ) self.UppStufenHeadline[i].Show() y_slot = 47 for t in xrange(9): x_slot = 20 for z in xrange(3): self.UppItemsSlots[uppitemslots] = ui.GridSlotWindow() self.UppItemsSlots[uppitemslots].SetParent( self.itemBoards[i]) self.UppItemsSlots[uppitemslots].ArrangeSlot( uppitemslots, 1, 1, 32, 32, 0, 0) self.UppItemsSlots[uppitemslots].SetPosition( y_slot, x_slot) self.UppItemsSlots[uppitemslots].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.UppItemsSlots[uppitemslots].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.UppItemsSlots[uppitemslots].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slot)) self.UppItemsSlots[uppitemslots].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slot)) self.UppItemsSlots[uppitemslots].Show() uppitemslots = uppitemslots + 1 x_slot = x_slot + 32 if z == 2: y_slot = y_slot + 45 i = i + 1 x = x + 135 self.scrollbar = ui.ScrollBar() self.scrollbar.SetParent(self.Board) self.scrollbar.SetScrollBarSize(400) self.scrollbar.SetPosition(675, 35) self.scrollbar.SetMiddleBarSize( float(board_count) / float(len(settinginfo.SchmiedeHandBuchInfosPVP[self.Category][1]))) self.scrollbar.SetScrollEvent(self.__OnScroll) self.scrollbar.Show() self.LoadCategory(0)
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 LoadUI(self): settinginfo.UppItemStorageOpen = 1 self.Board = ui.BoardWithRoofBar() self.Board.SetSize(266, 425 + 20 - self.YamatoHeight - 20) self.Board.SetCenterPosition() self.Board.AddFlag("movable") self.Board.AddFlag("float") self.Board.AddFlag("attach") # self.Board.SetTitleName("UppItem-Lager") self.Board.SetCloseEvent(self.__del__) self.Board.Show() self.itemtooltipup = uiToolTip.ItemToolTip() self.itemtooltipup.HideToolTip() self.NormalButtonUp = ui.Button() self.NormalButtonUp.SetParent(self.Board) self.NormalButtonUp.SetPosition(16 + self.YamatoWidth, 33 + self.YamatoHeight) self.NormalButtonUp.SetText("") self.NormalButtonUp.SetUpVisual( "d:/ymir work/ui/game/windows/tab_button_large_01.sub") self.NormalButtonUp.SetOverVisual( "d:/ymir work/ui/game/windows/tab_button_large_02.sub") self.NormalButtonUp.SetDownVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.NormalButtonUp.SetEvent(ui.__mem_func__(self.ChangeActionMode), 1) self.NormalButtonUp.Hide() self.NormalButtonDown = ui.Button() self.NormalButtonDown.SetParent(self.Board) self.NormalButtonDown.SetPosition(16 + self.YamatoWidth, 33 + self.YamatoHeight) self.NormalButtonDown.SetText("") self.NormalButtonDown.SetUpVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.NormalButtonDown.SetOverVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.NormalButtonDown.SetDownVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.NormalButtonDown.SetEvent(ui.__mem_func__(self.ChangeActionMode), 1) self.NormalButtonDown.Show() self.UsuallyButtonUp = ui.Button() self.UsuallyButtonUp.SetParent(self.Board) self.UsuallyButtonUp.SetPosition(95 + self.YamatoWidth, 33 + self.YamatoHeight) self.UsuallyButtonUp.SetText("") self.UsuallyButtonUp.SetUpVisual( "d:/ymir work/ui/game/windows/tab_button_large_01.sub") self.UsuallyButtonUp.SetOverVisual( "d:/ymir work/ui/game/windows/tab_button_large_02.sub") self.UsuallyButtonUp.SetDownVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.UsuallyButtonUp.SetEvent(ui.__mem_func__(self.ChangeActionMode), 2) self.UsuallyButtonUp.Show() self.UsuallyButtonDown = ui.Button() self.UsuallyButtonDown.SetParent(self.Board) self.UsuallyButtonDown.SetPosition(95 + self.YamatoWidth, 33 + self.YamatoHeight) self.UsuallyButtonDown.SetText("") self.UsuallyButtonDown.SetUpVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.UsuallyButtonDown.SetOverVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.UsuallyButtonDown.SetDownVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.UsuallyButtonDown.SetEvent(ui.__mem_func__(self.ChangeActionMode), 2) self.UsuallyButtonDown.Hide() self.RareButtonUp = ui.Button() self.RareButtonUp.SetParent(self.Board) self.RareButtonUp.SetPosition(174 + self.YamatoWidth, 33 + self.YamatoHeight) self.RareButtonUp.SetText("") self.RareButtonUp.SetUpVisual( "d:/ymir work/ui/game/windows/tab_button_large_01.sub") self.RareButtonUp.SetOverVisual( "d:/ymir work/ui/game/windows/tab_button_large_02.sub") self.RareButtonUp.SetDownVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.RareButtonUp.SetEvent(ui.__mem_func__(self.ChangeActionMode), 3) self.RareButtonUp.Show() self.RareButtonDown = ui.Button() self.RareButtonDown.SetParent(self.Board) self.RareButtonDown.SetPosition(174 + self.YamatoWidth, 33 + self.YamatoHeight) self.RareButtonDown.SetText("") self.RareButtonDown.SetUpVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.RareButtonDown.SetOverVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.RareButtonDown.SetDownVisual( "d:/ymir work/ui/game/windows/tab_button_large_03.sub") self.RareButtonDown.SetEvent(ui.__mem_func__(self.ChangeActionMode), 3) self.RareButtonDown.Hide() self.ButtonTextLines = ui.TextLine() self.ButtonTextLines.SetParent(self.Board) self.ButtonTextLines.SetPosition(30 + self.YamatoWidth, 36 + self.YamatoHeight) self.ButtonTextLines.SetText( " Normal Gewöhnlich Selten") self.ButtonTextLines.Show() self.SplitTitleBar = ui.HorizontalBar() self.SplitTitleBar.SetParent(self.Board) self.SplitTitleBar.Create(235) self.SplitTitleBar.SetPosition(16 + self.YamatoWidth, 55 + self.YamatoHeight) self.SplitTitleBar.Show() slot_count = 60 i = 0 line_count = 0 height_jump = 6 width = 38 + self.YamatoWidth height = 75 + self.YamatoHeight while i < slot_count: self.slotImages[i] = ui.ImageBox() self.slotImages[i].SetParent(self.Board) self.slotImages[i].SetPosition(width, height) self.slotImages[i].LoadImage( "d:/ymir work/ui/public/slot_base.sub") self.slotImages[i].Show() self.itemSlots[i] = ui.GridSlotWindow() self.itemSlots[i].SetParent(self.slotImages[i]) self.itemSlots[i].ArrangeSlot(i, 1, 1, 32, 32, 0, 0) self.itemSlots[i].SetPosition(0, 0) self.itemSlots[i].SetOverInItemEvent( ui.__mem_func__(self.ShowToolTip)) self.itemSlots[i].SetOverOutItemEvent( ui.__mem_func__(self.HideToolTip)) self.itemSlots[i].SetSelectEmptySlotEvent( ui.__mem_func__(self.add_slot)) self.itemSlots[i].SetSelectItemSlotEvent( ui.__mem_func__(self.del_slot)) self.itemSlots[i].SetCoverButton(i) self.itemSlots[i].Show() width = width + 32 line_count = line_count + 1 if line_count == height_jump: width = 38 + self.YamatoWidth height = height + 32 line_count = 0 i = i + 1 height = height + 10 self.StoreAllButton = ui.Button() self.StoreAllButton.SetParent(self.Board) self.StoreAllButton.SetPosition(43 + self.YamatoWidth, height) self.StoreAllButton.SetText("") self.StoreAllButton.SetUpVisual( "d:/ymir work/ui/public/xlarge_button_01.sub") self.StoreAllButton.SetOverVisual( "d:/ymir work/ui/public/xlarge_button_02.sub") self.StoreAllButton.SetDownVisual( "d:/ymir work/ui/public/xlarge_button_03.sub") self.StoreAllButton.SetEvent(self.StoreAll) self.StoreAllButton.Show() self.ButtonTextLine = ui.TextLine() self.ButtonTextLine.SetParent(self.Board) self.ButtonTextLine.SetPosition(133 + self.YamatoWidth, height + 5) self.ButtonTextLine.SetText("Alles einlagern!") self.ButtonTextLine.SetHorizontalAlignCenter() self.ButtonTextLine.Show()