Ejemplo n.º 1
0
    def __LoadScript(self):
        self.board = ui.BoardWithTitleBar()
        self.board.SetPosition(10, 10)
        self.board.SetSize(185, 190)
        self.board.AddFlag("movable")
        self.board.SetTitleName("Gildenlager Bumser")
        self.board.Show()

        self.addItem = ui.Button()
        self.addItem.SetParent(self.board)
        self.addItem.SetUpVisual("d:/ymir work/ui/public/xsmall_button_01.sub")
        self.addItem.SetOverVisual(
            "d:/ymir work/ui/public/xsmall_button_02.sub")
        self.addItem.SetDownVisual(
            "d:/ymir work/ui/public/xsmall_button_03.sub")
        self.addItem.SetPosition(20, 50)
        self.addItem.SetEvent(ui.__mem_func__(self.addItemToGuildstorage))
        self.addItem.SetText('addItem')
        self.addItem.Show()

        self.takeItem = ui.Button()
        self.takeItem.SetParent(self.board)
        self.takeItem.SetUpVisual(
            "d:/ymir work/ui/public/xsmall_button_01.sub")
        self.takeItem.SetOverVisual(
            "d:/ymir work/ui/public/xsmall_button_02.sub")
        self.takeItem.SetDownVisual(
            "d:/ymir work/ui/public/xsmall_button_03.sub")
        self.takeItem.SetPosition(70, 50)
        self.takeItem.SetEvent(ui.__mem_func__(self.takeItemFromGuildstorage))
        self.takeItem.SetText('takeItem')
        self.takeItem.Show()

        self.isLoaded = TRUE
Ejemplo n.º 2
0
    def BuildWindow(self):
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetSize(445, 429)
        self.Board.SetCenterPosition()
        self.Board.AddFlag('movable')
        self.Board.AddFlag('float')
        self.Board.SetTitleName('Window')
        self.Board.SetCloseEvent(self.Close)
        self.Board.Show()
        self.__BuildKeyDict()
        self.comp = Component()

        self.chrRenderer = ui.RenderTarget()
        self.chrRenderer.SetParent(self.Board)
        self.chrRenderer.SetSize(190, 210)
        self.chrRenderer.SetPosition(16, 35)
        self.chrRenderer.SetRenderTarget(self.RENDER_TARGET_INDEX)
        self.chrRenderer.Show()

        self.btnSet = self.comp.Button(
            self.Board, 'Set', '', 92, 384, self.btnSet_func,
            'd:/ymir work/ui/public/small_button_01.sub',
            'd:/ymir work/ui/public/small_button_02.sub',
            'd:/ymir work/ui/public/small_button_03.sub')
        self.slotbar_txtModel, self.txtModel = self.comp.EditLine(
            self.Board, '101', 20, 386, 60, 15, 10)

        renderTarget.SetBackground(
            self.RENDER_TARGET_INDEX,
            "d:/ymir work/ui/game/myshop_deco/model_view_bg.sub")
        renderTarget.SetVisibility(self.RENDER_TARGET_INDEX, True)

        renderTarget.SelectModel(self.RENDER_TARGET_INDEX, 101)
Ejemplo n.º 3
0
 def BuildWindow(self):
     self.Board = ui.BoardWithTitleBar()
     self.Board.SetSize(465, 298)
     self.Board.SetCenterPosition()
     self.Board.AddFlag('movable')
     self.Board.AddFlag('float')
     self.Board.SetTitleName('PythonLoader by Noa')
     self.Board.SetCloseEvent(self.Close)
     self.Board.Show()
     self.comp = Component()
     self.run = self.comp.Button(
         self.Board, 'Run', '', 17, 260, self.run_func,
         'd:/ymir work/ui/public/large_button_01.sub',
         'd:/ymir work/ui/public/large_button_02.sub',
         'd:/ymir work/ui/public/large_button_03.sub')
     self.close = self.comp.Button(
         self.Board, 'CloseMetin', '', 362, 260, self.close_func,
         'd:/ymir work/ui/public/large_button_01.sub',
         'd:/ymir work/ui/public/large_button_02.sub',
         'd:/ymir work/ui/public/large_button_03.sub')
     self.fresh = self.comp.Button(
         self.Board, 'Refresh', '', 262, 260, self.refresh_func,
         'd:/ymir work/ui/public/large_button_01.sub',
         'd:/ymir work/ui/public/large_button_02.sub',
         'd:/ymir work/ui/public/large_button_03.sub')
     self.bar_liste, self.list_liste = self.comp.ListBoxEx(
         self.Board, 6, 30, 451, 223)
     self.log = self.comp.TextLine(self.Board, 'Log', 115, 264,
                                   self.comp.RGB(255, 255, 255))
Ejemplo n.º 4
0
 def CreateBoardWithTitle(self, x, y, width, height):
     board = ui.BoardWithTitleBar()
     board.SetSize(width, height)
     board.SetPosition(x, y)
     board.AddFlag("movable")
     board.Show()
     return board
Ejemplo n.º 5
0
	def BuildWindow(self):
		self.Board = ui.BoardWithTitleBar()
		self.Board.SetSize(300, 260)
		self.Board.SetCenterPosition()
		self.Board.AddFlag('movable')
		self.Board.AddFlag('float')
		self.Board.SetTitleName('WaitHack')
		self.Board.SetCloseEvent(self.Close)
		self.Board.Hide()
		self.comp = UIComponents.Component()

		self.enableButton = self.comp.OnOffButton(self.Board, '', '', 130, 200, OffUpVisual='OpenBot/Images/start_0.tga', OffOverVisual='OpenBot/Images/start_1.tga', OffDownVisual='OpenBot/Images/start_2.tga',OnUpVisual='OpenBot/Images/stop_0.tga', OnOverVisual='OpenBot/Images/stop_1.tga', OnDownVisual='OpenBot/Images/stop_2.tga' )
  		self.playerClose = self.comp.OnOffButton(self.Board, '', '', 130, 50)
		self.RangeLabel = self.comp.TextLine(self.Board, 'Range', 13, 92, self.comp.RGB(255, 255, 255))
		self.SpeedLabel = self.comp.TextLine(self.Board, 'Speed', 13, 126, self.comp.RGB(255, 255, 255))
		self.MonsterLabel = self.comp.TextLine(self.Board, 'Monsters', 13, 160, self.comp.RGB(255, 255, 255))
		self.PlayerLabel = self.comp.TextLine(self.Board, 'Stop when player close', 12, 51, self.comp.RGB(255, 255, 255))
  		self.rangeNum = self.comp.TextLine(self.Board, '100', 254, 92, self.comp.RGB(255, 255, 255))
		self.speedNum = self.comp.TextLine(self.Board, '100 ms', 254, 125, self.comp.RGB(255, 255, 255))
		self.monsterNum = self.comp.TextLine(self.Board, '100', 254, 160, self.comp.RGB(255, 255, 255))
		self.RangeSlider = self.comp.SliderBar(self.Board, 0.0, self.Range_func, 73, 94)
		self.SpeedSlider = self.comp.SliderBar(self.Board, 0.0, self.Speed_func, 73, 127)
		self.MonsterSlider = self.comp.SliderBar(self.Board, 0.0, self.Monster_func, 73, 161)
		self.enableButton.SetOff()

		self.loadSettings()

		self.range = 0
		self.speed = 0
		self.lastTime = 0
		self.maxMonster = 0
		self.Speed_func()
		self.Range_func()
		self.Monster_func()
Ejemplo n.º 6
0
    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()
Ejemplo n.º 7
0
	def LoadUI(self):
		self.Board = ui.BoardWithTitleBar()
		self.Board.SetSize(330, 185)
		# self.Board.SetPosition(wndMgr.GetScreenWidth()/2-165,wndMgr.GetScreenHeight()-wndMgr.GetScreenHeight()+100)
		self.Board.SetCenterPosition()
		self.Board.AddFlag("movable")
		self.Board.AddFlag("float")
		self.Board.SetTitleName("Fehlerbericht senden") 
		self.Board.SetCloseEvent(self.Manage)
		self.Board.Hide()
		
		self.ReportBG = ui.Bar()
		self.ReportBG.SetParent(self.Board)
		self.ReportBG.SetPosition(15,35)
		self.ReportBG.SetSize(300,100)
		self.ReportBG.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.5))
		self.ReportBG.Show()

		self.ReportEditLine = ui.EditLine()
		self.ReportEditLine.SetParent(self.Board)
		self.ReportEditLine.SetPosition(20,40)
		self.ReportEditLine.SetSize(300,95)
		self.ReportEditLine.bCodePage = True
		self.ReportEditLine.SetLimitWidth(295)
		self.ReportEditLine.SetMultiLine()
		self.ReportEditLine.SetMax(240)
		self.ReportEditLine.Show()
		
		self.ReportButtonBG = ui.Bar()
		self.ReportButtonBG.SetParent(self.Board)
		self.ReportButtonBG.SetPosition(15,138)
		self.ReportButtonBG.SetSize(300,30)
		self.ReportButtonBG.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.5))
		self.ReportButtonBG.Show()
		
		self.SendReportButton = ui.ToolTipButton()
		self.SendReportButton.SetParent(self.Board)
		self.SendReportButton.SetPosition(120,142)
		self.SendReportButton.SetText("")
		self.SendReportButton.SetButtonWidth(90)
		self.SendReportButton.AppendToolTipTextLine("Falschmeldungen oder ausnutzen dieser Funktion führt zur Accountsperre!")
		self.SendReportButton.ArrangeToolTip()
		self.SendReportButton.SetUpVisual("d:/ymir work/ui/public/Large_Button_01.sub")
		self.SendReportButton.SetOverVisual("d:/ymir work/ui/public/Large_Button_02.sub")
		self.SendReportButton.SetDownVisual("d:/ymir work/ui/public/Large_Button_03.sub")
		self.SendReportButton.SetEvent(self.__SendBugReport)
		self.SendReportButton.Show()	
		
		self.SendReportButtonTextLine = ui.TextLine()
		self.SendReportButtonTextLine.SetParent(self.Board)
		self.SendReportButtonTextLine.SetPosition(165,145)
		self.SendReportButtonTextLine.SetText("Senden...")
		self.SendReportButtonTextLine.SetHorizontalAlignCenter()
		self.SendReportButtonTextLine.Show()
Ejemplo n.º 8
0
    def __LoadQuestionDialog(self):
        self.UI["board"] = ui.BoardWithTitleBar()
        self.UI["board"].SetCenterPosition()
        self.UI["board"].AddFlag("movable")
        if POSITION_FIX:
            self.UI["board"].SetSize(240, 170)
        else:
            self.UI["board"].SetSize(240, 180)
        self.UI["board"].SetCenterPosition()
        self.UI["board"].SetTop()
        self.UI["board"].SetTitleName(uiScriptLocale.SHOP_WINDOW_CREATE)
        self.UI["board"].Hide()

        self.UI["nameText"] = ui.MakeText(self.UI["board"],
                                          uiScriptLocale.SHOP_NAME, 95, 30,
                                          None)
        self.UI["nameEdit"] = Edit2(self.UI["board"], "", 10, 45, 150, 25,
                                    FALSE, 6, 30)

        self.UI["selectText"] = ui.TextLine()
        self.UI["selectText"].SetParent(self.UI["board"])
        self.UI["selectText"].SetPosition(15, 70)
        self.UI["selectText"].SetFeather()
        self.UI["selectText"].SetDefaultFontName()
        self.UI["selectText"].SetOutline()
        self.UI["selectText"].SetText(uiScriptLocale.SHOP_TIMEOUT)
        self.UI["selectText"].Show()

        self.UI["create"] = ui.MakeButton(self.UI["board"], 30, 110, "",
                                          "d:/ymir work/ui/public/",
                                          "xlarge_button_01.sub",
                                          "xlarge_button_02.sub",
                                          "xlarge_button_03.sub")
        self.UI["create"].SetText(uiScriptLocale.SHOP_CREATE)
        self.UI["create"].SetEvent(ui.__mem_func__(self.CreateShop))
        self.UI["create"].Show()

        self.UI["cancel"] = ui.MakeButton(self.UI["board"], 30, 140, "",
                                          "d:/ymir work/ui/public/",
                                          "xlarge_button_01.sub",
                                          "xlarge_button_02.sub",
                                          "xlarge_button_03.sub")
        self.UI["cancel"].SetText(uiScriptLocale.CANCEL)
        self.UI["cancel"].SetEvent(ui.__mem_func__(self.Close))
        self.UI["cancel"].Show()

        self.UI["price"] = ui.MakeText(self.UI["board"], "", 15, 90, None)
        self.UI["price"].SetFeather()
        self.UI["price"].SetDefaultFontName()
        self.UI["price"].SetOutline()
        self.UI["price"].Show()
        self.CreateList()
Ejemplo n.º 9
0
    def LoadDialog(self):
        self.UI["board"] = ui.BoardWithTitleBar()
        self.UI["board"].SetParent(self)
        self.UI["board"].SetSize(200, self.BoardHeight)
        self.UI["board"].SetTitleName(uiScriptLocale.SHOP_WINDOW_NAME)
        self.UI["board"].SetCloseEvent(self.Close)
        self.UI["board"].Show()
        self.UI["shops"] = {}

        self.Edit["Board"] = ui.BoardWithTitleBar()
        self.Edit["Board"].SetParent(self)
        self.Edit["Board"].SetSize(150, 100)
        if POSITION_FIX:
            self.Edit["Board"].SetPosition(250, 0)
        else:
            self.Edit["Board"].SetPosition(220, 0)
        self.Edit["Board"].SetTitleName(uiScriptLocale.SHOP_SELECT)
        self.Edit["Board"].SetCloseEvent(self.CloseEdit)
        self.Edit["Board"].Hide()

        self.SetCenterPosition()
        self.AddFlag("movable")
        self.UpdateSize()
Ejemplo n.º 10
0
	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()
Ejemplo n.º 11
0
	def BuildWindow(self):
		self.Board = ui.BoardWithTitleBar()
		self.Board.SetSize(448, 130)
		self.Board.SetPosition(52, 40)
		self.Board.AddFlag('movable')
		self.Board.AddFlag('float')
		self.Board.SetTitleName('Python File Loader')
		self.Board.SetCloseEvent(self.Board.Hide)
		self.Board.Hide()
		self.comp = UIComponents.Component()

		self.loadFileButton = self.comp.Button(self.Board, 'Load File', '', 341, 61, self.loadFile, 'd:/ymir work/ui/public/large_button_01.sub', 'd:/ymir work/ui/public/large_button_02.sub', 'd:/ymir work/ui/public/large_button_03.sub')
		self.slotbar_file, self.fileEditBox = self.comp.EditLine(self.Board, 'file.py', 24, 63, 310, 15, 60)
		self.text8 = self.comp.TextLine(self.Board, 'Python File Loader', 179, 41, self.comp.RGB(255, 255, 0))
  		self.text9 = self.comp.TextLine(self.Board, 'Note: File has to be at the same location as the injector', 28, 81, self.comp.RGB(255, 255, 255))
Ejemplo n.º 12
0
	def BoardWithTitleBar(self, parent, moveable, x, y, width, heigh, title, closeevent):
		tmpTitleBoard = ui.BoardWithTitleBar()
		
		if parent:
			tmpTitleBoard.SetParent(parent)
		
		if moveable:
			tmpTitleBoard.AddFlag('movable')
			tmpTitleBoard.AddFlag('float')
		
		tmpTitleBoard.SetSize(width, heigh)
		tmpTitleBoard.SetPosition(x, y)
		tmpTitleBoard.SetTitleName(title)
		tmpTitleBoard.SetCloseEvent(closeevent)

		tmpTitleBoard.Show()
		return tmpTitleBoard
Ejemplo n.º 13
0
    def __init__(self):
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetTitleName('ShopCreator')
        self.Board.SetPosition(52, 40)
        self.Board.SetSize(350, 500)
        self.Board.AddFlag('movable')
        self.Board.Hide()
        self.Board.SetCloseEvent(self.Hide_UI)

        self.comp = UIComponents.Component()
        self.Name = self.comp.TextLine(self.Board, 'Shop-Name:', 30, 440,
                                       self.comp.RGB(255, 255, 0))

        #self.CloseButton = self.comp.Button(self.Board, '', 'Close', 359, 8, self.Hide_UI, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
        self.MultiplicationButton = self.comp.OnOffButton(
            self.Board, '   Multiply',
            'If selected, price will be multiplied by number of items', 250,
            440)
        self.MakeShopButton = self.comp.Button(
            self.Board, 'Make Shop', '', 130, 470, self.CreateShop,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.ShopNameSlotbar, self.ShopNameEditline = self.comp.EditLine(
            self.Board, '', 95, 440, 140, 18, 25)

        self.startX = 15
        self.startY = 35

        self.sizeEditLine = 45

        self.stepY = 19
        self.stepX = 170
        self.endY = 400

        self.ShopNameEditline.SetText(FileManager.ReadConfig("ShopName"))
        self.MultiplicationButton.SetValue(
            boolean(FileManager.ReadConfig("Multiplication")))

        self.items_ui = dict()
        self.iniItems = []
        self.ReloadInv()
Ejemplo n.º 14
0
    def BuildWindow(self):
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetSize(305, 179)
        self.Board.SetCenterPosition()
        self.Board.AddFlag('movable')
        self.Board.AddFlag('float')
        self.Board.SetTitleName('Settings')
        self.Board.SetCloseEvent(self.Close)
        self.Board.Show()
        self.comp = Component()

        self.save = self.comp.Button(
            self.Board, 'Speichern', '', 15, 129, self.save_func,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.close = self.comp.Button(
            self.Board, 'Schließen', '', 197, 129, self.close_func,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.reset = self.comp.Button(
            self.Board, 'Reset', '', 106, 129, self.reset_func,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.slotbar_typinput, self.typinput = self.comp.EditLine(
            self.Board, 'm', 66, 42, 60, 15, 10)
        self.slotbar_umkreisinput, self.umkreisinput = self.comp.EditLine(
            self.Board, '10', 192, 42, 60, 15, 10)
        self.slotbar_timeinput, self.timeinput = self.comp.EditLine(
            self.Board, '1s', 66, 82, 60, 15, 10)
        self.slotbar_idvnum, self.idvnum = self.comp.EditLine(
            self.Board, '', 192, 81, 60, 15, 10)
        self.typlabel = self.comp.TextLine(self.Board, 'Typ:', 25, 42,
                                           self.comp.RGB(255, 255, 255))
        self.umkr = self.comp.TextLine(self.Board, 'Umkreis:', 145, 42,
                                       self.comp.RGB(255, 255, 255))
        self.vnuml = self.comp.TextLine(self.Board, 'Monster:', 145, 83,
                                        self.comp.RGB(255, 255, 255))
        self.timelabel = self.comp.TextLine(self.Board, 'Zeit:', 25, 83,
                                            self.comp.RGB(255, 255, 255))
Ejemplo n.º 15
0
    def __init__(self, onAdd, x, y):
        ui.Window.__init__(self)
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetSize(200, 335)
        self.Board.SetPosition(x, y)
        self.Board.SetTitleName("Item List")
        self.Board.SetCloseEvent(self.Close)
        self.Board.AddFlag("movable")
        self.Board.Show()

        self.onAdd = onAdd

        self.comp = UIComponents.Component()
        self.ItemValueText = self.comp.TextLine(self.Board, 'Search Item:',
                                                19, 33,
                                                self.comp.RGB(255, 255, 255))
        self.SearchPickItemButton = self.comp.Button(
            self.Board, 'Search', '', 147, 48, lambda: self.UpdateFileList(2),
            'd:/ymir work/ui/public/small_Button_01.sub',
            'd:/ymir work/ui/public/small_Button_02.sub',
            'd:/ymir work/ui/public/small_Button_03.sub')
        self.SelectBonus = self.comp.Button(
            self.Board, 'Add', '', 25, 295, self.addItem,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        self.CancelBonus = self.comp.Button(
            self.Board, 'Cancel', '', 115, 295, self.Close,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        self.PickSearchItemSlotBar, self.PickSearchItemEditLine = self.comp.EditLine(
            self.Board, '', 15, 50, 120, 15, 20)
        self.PickfileListBox, self.PickScrollBar = self.comp.FileListBox(
            self.Board, 15, 80, 180, 200, 10)

        self.UpdateFileList(1)
Ejemplo n.º 16
0
	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 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()
Ejemplo n.º 18
0
    def LoadUI(self):
        if self.gui == 1:
            self.gui = 2
            self.Board.Show()
            #self.SetLayoutType(settinginfo.DailyQuest_Status)

        elif self.gui == 2:
            self.gui = 1
            self.Board.Hide()
        else:
            self.gui = 1
            self.Board = ui.BoardWithTitleBar()
            self.Board.SetSize(250, 200)
            self.Board.SetCenterPosition()
            self.Board.AddFlag("movable")
            self.Board.AddFlag("float")
            self.Board.SetTitleName("Daily-Quest")
            self.Board.SetCloseEvent(self.CloseX)
            self.Board.Show()

            self.InfoThinBoard = ui.ThinBoard()
            self.InfoThinBoard.SetParent(self.Board)
            self.InfoThinBoard.SetPosition(15, 35)
            self.InfoThinBoard.SetSize(220, 45)
            self.InfoThinBoard.Show()

            self.MainTimeLine = ui.TextLine()
            self.MainTimeLine.SetParent(self.InfoThinBoard)
            self.MainTimeLine.SetPosition(110, 15)
            self.MainTimeLine.SetHorizontalAlignCenter()
            self.MainTimeLine.SetText("[ Neue Quest in 13:59:57 Std. ]")
            self.MainTimeLine.SetFontColor(0.9, 0.4745, 0.4627)
            self.MainTimeLine.Show()

            self.TargetThinBoard = ui.ThinBoard()
            self.TargetThinBoard.SetParent(self.Board)
            self.TargetThinBoard.SetPosition(15, 85)
            self.TargetThinBoard.SetSize(220, 60)
            self.TargetThinBoard.Show()

            self.TargetTextLine[0] = ui.TextLine()
            self.TargetTextLine[0].SetParent(self.TargetThinBoard)
            self.TargetTextLine[0].SetPosition(110, 15)
            self.TargetTextLine[0].SetHorizontalAlignCenter()
            self.TargetTextLine[0].SetText("")
            self.TargetTextLine[0].SetFontColor(0.9, 0.4745, 0.4627)
            self.TargetTextLine[0].Show()

            self.TargetTextLine[1] = ui.TextLine()
            self.TargetTextLine[1].SetParent(self.TargetThinBoard)
            self.TargetTextLine[1].SetPosition(110, 30)
            self.TargetTextLine[1].SetHorizontalAlignCenter()
            self.TargetTextLine[1].SetText("")
            self.TargetTextLine[1].SetFontColor(0.9, 0.4745, 0.4627)
            self.TargetTextLine[1].Show()

            self.QuestInitButton = ui.Button()
            self.QuestInitButton.SetParent(self.Board)
            self.QuestInitButton.SetPosition(35, 95)
            self.QuestInitButton.SetText("")
            self.QuestInitButton.SetUpVisual(
                "d:/ymir work/ui/public/xlarge_button_01.sub")
            self.QuestInitButton.SetOverVisual(
                "d:/ymir work/ui/public/xlarge_button_02.sub")
            self.QuestInitButton.SetDownVisual(
                "d:/ymir work/ui/public/xlarge_button_03.sub")
            self.QuestInitButton.SetEvent(self.QuestInit)
            self.QuestInitButton.Show()

            self.QuestInitButtonText = ui.TextLine()
            self.QuestInitButtonText.SetParent(self.Board)
            self.QuestInitButtonText.SetPosition(125, 100)
            self.QuestInitButtonText.SetText("Quest starten")
            self.QuestInitButtonText.SetHorizontalAlignCenter()
            self.QuestInitButtonText.SetFontColor(1.0, 0.7843, 0.0)
            self.QuestInitButtonText.Show()
            self.Board.Hide()
Ejemplo n.º 19
0
    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)
Ejemplo n.º 20
0
    def __init__(self):
        self.closeAttempt = 0
        ui.ScriptWindow.__init__(self)
        net_packet.RegisterNewShopCallback(shopCallback)

        self.Board = ui.BoardWithTitleBar()
        self.Board.SetTitleName('SearchBot')
        self.Board.SetCloseEvent(self.CloseWindow)
        self.Board.SetSize(BOARD_SIZE_X, BOARD_SIZE_Y)
        self.Board.SetCenterPosition()
        self.Board.AddFlag("movable")
        #self.Board.Show()

        self.comp = UIComponents.Component()
        self.SearchButton = self.comp.OnOffButton(
            self.Board,
            '',
            '',
            relativeCenterX(-20),
            relativeEndY(55),
            funcState=self.EnableButtonClicked,
            OffUpVisual='OpenBot/Images/start_0.tga',
            OffOverVisual='OpenBot/Images/start_1.tga',
            OffDownVisual='OpenBot/Images/start_2.tga',
            OnUpVisual='OpenBot/Images/stop_0.tga',
            OnOverVisual='OpenBot/Images/stop_1.tga',
            OnDownVisual='OpenBot/Images/stop_2.tga')
        self.SearchButton.SetOff()
        #self.SearchButton = self.comp.ToggleButton(self.Board,'Search Shops','',relativeCenterX(-48),relativeEndY(45),self.StopSearch,self.StartSearch,'d:/ymir work/ui/public/large_button_01.sub', 'd:/ymir work/ui/public/large_button_02.sub', 'd:/ymir work/ui/public/large_button_03.sub')

        self.SkillIdNameLabel = self.comp.TextLine(
            self.Board, 'Item Name		Shop Name		Price', 16, 30,
            self.comp.RGB(255, 255, 255))
        self.BarItems, self.ListBoxItems, ScrollItems = self.comp.ListBoxEx(
            self.Board, 10, 45, relativeEndX(42), relativeEndY(205))
        self.ListBoxItems.SetViewItemCount(12)

        self.ItemEditBoxSlot, self.ItemEditBoxValue = self.comp.EditLine(
            self.Board, "", 15, relativeEndY(-148), relativeEndX(120), 14, 25)
        self.ItemSubmitButton = self.comp.Button(
            self.Board, 'Search', 'Search in List', relativeEndX(-100),
            relativeEndY(150), self.UpdateItemList,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')

        #self.DistanceLabel = self.comp.TextLine(self.Board, 'Distance to Shop: ', 16, relativeEndY(35), self.comp.RGB(255, 255, 0))
        #self.DistanceNumber = self.comp.TextLine(self.Board, 'NULL', 100, relativeEndY(35), self.comp.RGB(255, 255, 0))
        self.BuyItemButton = self.comp.Button(
            self.Board, 'Buy Item', 'Buy selected Item', relativeEndX(-100),
            relativeEndY(80), self.BuySelectedItem,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.OpenShopButton = self.comp.Button(
            self.Board, 'Open Shop', 'Open the selected shop',
            relativeEndX(-100), relativeEndY(120), self.OpenSelectedShop,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')
        self.MoveShopButton = self.comp.Button(
            self.Board, 'Move to Shop', 'Move to selected shop',
            relativeEndX(-100), relativeEndY(100), self.MoveSelectedShop,
            'd:/ymir work/ui/public/large_button_01.sub',
            'd:/ymir work/ui/public/large_button_02.sub',
            'd:/ymir work/ui/public/large_button_03.sub')

        self.lShopsSearch = self.comp.TextLine(self.Board, '', 14,
                                               relativeEndY(100),
                                               self.comp.RGB(255, 255, 0))
        self.lShopsToBeSearch = self.comp.TextLine(self.Board, '', 15,
                                                   relativeEndY(80),
                                                   self.comp.RGB(255, 255, 0))
        self.lNumItems = self.comp.TextLine(self.Board, '', 14,
                                            relativeEndY(120),
                                            self.comp.RGB(255, 255, 0))

        self.PlayersVids = []
        self.State = 0
        self.PlayerIndex = 0
Ejemplo n.º 21
0
    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetSize(210, 460)
        self.Board.SetPosition(52, 40)
        self.Board.SetTitleName('Inventory Manager')
        self.Board.AddFlag('movable')
        self.Board.SetCloseEvent(self.Board.Hide)

        self.comp = UIComponents.Component()
        self.ListBoxLabel = self.comp.TextLine(self.Board,
                                               ' Slot:	 ID:			Name:', 8, 33,
                                               self.comp.RGB(0, 229, 650))
        self.UpgradeLabel = self.comp.TextLine(self.Board, 'Upgrade			x',
                                               70, 308,
                                               self.comp.RGB(255, 255, 255))

        #self.Close = self.comp.Button(self.Board, '', 'Close', 188, 7, self.Board.Hide, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
        self.Refresh = self.comp.Button(
            self.Board, '', 'Refresh', 163, 7, self.UpdateFileList,
            'd:/ymir work/ui/game/guild/refresh_button_01.sub',
            'd:/ymir work/ui/game/guild/refresh_button_02.sub',
            'd:/ymir work/ui/game/guild/refresh_button_03.sub')
        self.UpgradeButton = self.comp.Button(
            self.Board, 'Upgrade', '', 110, 280, self.Upgrade,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.DropSelectedButton = self.comp.Button(
            self.Board, 'Drop Selected',
            'Drops all same Items like the selected one', 15, 333,
            self.DropItemSelected,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.DropAllButton = self.comp.Button(
            self.Board, 'Drop All', 'Drops ALL Items in your Inventory', 110,
            333, self.DropAllItemsRequest,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.SellSelectedButton = self.comp.Button(
            self.Board, 'Sell Selected',
            'Sells all same Items like the selected one', 15, 358,
            self.SellItemSelected,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.SellAllButton = self.comp.Button(
            self.Board, 'Sell All', 'Sells ALL Items in your Inventory', 110,
            358, self.SellAllItemsRequest,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.UpgradeSlotbar, self.UpgradeEditline = self.comp.EditLine(
            self.Board, '1', 112, 307, 15, 18, 1)
        self.BarItems, self.ListBoxItems, ScrollItems = self.comp.ListBoxEx(
            self.Board, 10, 50, 170, 220)
        self.ModeCombo = self.comp.ComboBox(self.Board, 'Normal', 20, 282, 70)
        self.DropAllSelButton = self.comp.Button(
            self.Board, 'Drop All Selected', 'Drop items with same ID', 110,
            383, self.DropAllItemsSelected,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.SellAllSelButton = self.comp.Button(
            self.Board, 'Sell All Selected', 'Sell items with same ID', 15,
            383, self.SellAllItemsSelected,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.autoSortButton = self.comp.Button(
            self.Board, 'Sort (Bugged)', 'Sort Inventory', 110, 423, self.Sort,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.stackButton = self.comp.Button(
            self.Board, 'Stack', 'Stack Items', 15, 423, self.StackItems,
            'd:/ymir work/ui/public/Large_button_01.sub',
            'd:/ymir work/ui/public/Large_button_02.sub',
            'd:/ymir work/ui/public/Large_button_03.sub')
        UppModes = ['Normal', 'DT', 'Guild', 'Bless', 'Metal', 'Normal - All']
        for Mode in UppModes:
            self.ModeCombo.InsertItem(0, Mode)
        self.UpgradeEditline.SetNumberMode()
        self.lastTime = 0

        self.toSellSlots = []
        self.toDropSlots = []
        self.toBuySlots = []

        self.toSortMoveActions = []
        self.toStackMoveActions = []

        self.callback = None
        self.UpdateFileList()
Ejemplo n.º 22
0
    def BuildWindow(self):
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetPosition(52, 40)
        self.Board.SetSize(300, 370)
        self.Board.SetTitleName("Settings")
        #	self.Board.AddFlag("float")
        self.Board.AddFlag("movable")
        self.Board.SetCloseEvent(self.Close)
        self.Board.Hide()

        self.comp = UIComponents.Component()

        self.TabWidget = UIComponents.TabWindow(
            10, 30, 300 - 20, 370 - 40, self.Board,
            ['General', 'Pickup', 'Attack', 'Shop'])
        self.generalTab = self.TabWidget.GetTab(0)
        self.pickupTab = self.TabWidget.GetTab(1)
        self.attackTab = self.TabWidget.GetTab(2)
        self.shopTab = self.TabWidget.GetTab(3)

        #self.MovespeedLabel = self.comp.TextLine(self.generalTab, '300', 256, 68, self.comp.RGB(255, 255, 255))
        #self.AttackspeedLabel = self.comp.TextLine(self.attackTab, '200', 256, 108, self.comp.RGB(255, 255, 255))
        #self.SlideMovespeed = self.comp.SliderBar(self.generalTab, 0.6, self.SlideMove, 66, 70)
        #self.SlideAttackspeed = self.comp.SliderBar(self.attackTab, 0.4, self.SlideAttack, 66, 110)

        #self.AttackSpeedButton = self.comp.Button(self.attackTab, '', 'Attack-Speed', 25, 60, self.SetAttackSpeed, 'OpenBot/Images/Shortcuts/attack_0.tga', 'OpenBot/Images/Shortcuts/attack_1.tga', 'OpenBot/Images/Shortcuts/attack_0.tga')
        #self.MoveSpeedButton = self.comp.Button(self.generalTab, '', 'Move-Speed', 25, 110, self.SetMoveSpeed, 'OpenBot/Images/Shortcuts/move_0.tga', 'OpenBot/Images/Shortcuts/move_1.tga', 'OpenBot/Images/Shortcuts/move_0.tga')
        #self.DayButton = self.comp.Button(self.Board, '', 'Day', 25, 120, self.SetDay, 'OpenBot/Images/General/sun_0.tga', 'OpenBot/Images/General/sun_1.tga', 'OpenBot/Images/General/sun_0.tga')
        #self.NightButton = self.comp.Button(self.Board, '', 'Night', 80, 120, self.SetNight, 'OpenBot/Images/General/moon_0.tga', 'OpenBot/Images/General/moon_1.tga', 'OpenBot/Images/General/moon_0.tga')

        self.DmgMenuButton = self.comp.Button(
            self.attackTab, '', 'Damage Hacks', 120, 150, self.OpenDmgMenu,
            'OpenBot/Images/General/dmg_0.tga',
            'OpenBot/Images/General/dmg_1.tga',
            'OpenBot/Images/General/dmg_0.tga')
        self.OneHandedButton = self.comp.Button(
            self.attackTab, '', 'One-Handed', 40, 150, self.SetOneHand,
            'OpenBot/Images/General/onehand_0.tga',
            'OpenBot/Images/General/onehand_1.tga',
            'OpenBot/Images/General/onehand_0.tga')
        self.TwoHandedButton = self.comp.Button(
            self.attackTab, '', 'Two-Handed', 200, 150, self.SetTwoHand,
            'OpenBot/Images/General/twohand_0.tga',
            'OpenBot/Images/General/twohand_1.tga',
            'OpenBot/Images/General/twohand_0.tga')

        ##GENERAL
        self.loginBtn = self.comp.OnOffButton(self.generalTab,
                                              '\t\t\t\t\t\tAuto Login',
                                              '',
                                              20,
                                              150,
                                              funcState=self.AutoLoginOnOff,
                                              defaultValue=int(self.autoLogin))
        self.reviveBtn = self.comp.OnOffButton(self.generalTab,
                                               '\t\t\t\t\t\tAuto Restart Here',
                                               '',
                                               20,
                                               130,
                                               funcState=self.ReviveOnOff,
                                               defaultValue=int(
                                                   self.restartHere))
        self.WallHackBtn = self.comp.OnOffButton(
            self.generalTab,
            '',
            'WallHack',
            200,
            130,
            image='OpenBot/Images/General/wall.tga',
            funcState=self.WallHackSwich,
            defaultValue=int(self.wallHack))

        self.redPotButton, self.SlideRedPot, self.redPotLabel = UIComponents.GetSliderButtonLabel(
            self.generalTab,
            self.SlideRedMove,
            '',
            'Use Red Potions',
            30,
            18,
            image="icon/item/27002.tga",
            funcState=self.OnRedOnOff,
            defaultValue=int(self.redPotions),
            defaultSlider=float(self.minHealth / 100.0))
        self.bluePotButton, self.SlideBluePot, self.bluePotLabel = UIComponents.GetSliderButtonLabel(
            self.generalTab,
            self.SlideBlueMove,
            '',
            'Use Blue Potions',
            30,
            50,
            image="icon/item/27005.tga",
            funcState=self.OnBlueOnOff,
            defaultValue=int(self.bluePotions),
            defaultSlider=float(self.minMana / 100.0))

        ##PICKUP
        self.pickupButton, self.SlidePickupSpeed, self.speedPickupLabel = UIComponents.GetSliderButtonLabel(
            self.pickupTab,
            self.pickupSpeedSlide,
            '',
            'Enable Pickup',
            30,
            18,
            image="OpenBot/Images/General/pickup.tga",
            funcState=self.OnPickupOnOff,
            defaultValue=int(self.pickUp),
            defaultSlider=float(self.pickUpSpeed / 3.0))
        self.rangePickupButton, self.SliderangePickup, self.rangePickupLabel = UIComponents.GetSliderButtonLabel(
            self.pickupTab,
            self.pickupRangeSlide,
            'Range',
            'Enable Range Pickup',
            15,
            60,
            funcState=self.OnRangePickupOnOff,
            offsetX=30,
            offsetY=4,
            defaultValue=int(self.useRangePickup),
            defaultSlider=float(self.pickUpRange / 10000.0))
        self.ItemValueText = self.comp.TextLine(self.pickupTab, 'Search Item:',
                                                15, 270,
                                                self.comp.RGB(255, 255, 255))
        self.SearchPickItemButton = self.comp.Button(
            self.pickupTab, 'Search', '', 210, 268, self.UpdatePickFilterList,
            'd:/ymir work/ui/public/small_Button_01.sub',
            'd:/ymir work/ui/public/small_Button_02.sub',
            'd:/ymir work/ui/public/small_Button_03.sub')
        self.AddPickItemBtn = self.comp.Button(
            self.pickupTab, 'Add Item', '', 200, 170, self.OpenPickItemDialog,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        self.PickCancelBtn = self.comp.Button(
            self.pickupTab, 'Remove', '', 200, 210,
            self.UIPickRemoveFilterItem,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        self.PickSearchItemSlotBar, self.PickSearchItemEditLine = self.comp.EditLine(
            self.pickupTab, '', 85, 270, 110, 15, 20)
        self.labelFilter = self.comp.TextLine(self.pickupTab, 'Pickup Filter',
                                              115, 90,
                                              self.comp.RGB(255, 255, 0))
        self.PickfilterModeBtn = self.comp.OnOffButton(
            self.pickupTab,
            '\t\t\tExclude Items',
            'If not selected will only pick items in the list',
            190,
            130,
            funcState=self.OnChangePickMode,
            defaultValue=int(self.excludeInFilter))
        self.PickbarItems, self.PickfileListBox, self.PickScrollBar = self.comp.ListBoxEx2(
            self.pickupTab, 15, 117, 140, 150)

        ##SHOP
        self.labelSell = self.comp.TextLine(self.shopTab,
                                            'Items to always sell', 95, 10,
                                            self.comp.RGB(255, 255, 0))
        self.ShopbarItems, self.ShopFileListBox, self.ShopScrollBar = self.comp.ListBoxEx2(
            self.shopTab, 60, 30, 140, 150)
        self.AddSellItemBtn = self.comp.Button(
            self.shopTab, 'Add', '', 65, 185, self.OpenSellItemDialog,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        self.SellRemoveBtn = self.comp.Button(
            self.shopTab, 'Remove', '', 140, 185, self.UISellRemoveFilterItem,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        #self.BtnRedBuy = self.comp.OnOffButton(self.generalTab, '', 'Buy Red Pots', 200, 130, image='icon/item/27002.tga',funcState=self.OnRedBuy,defaultValue=int(self.wallHack))

        ##Init labels
        self.UpdatePickFilterList()
        self.UpdateSellFilterList()
        self.pickupSpeedSlide()
        self.pickupRangeSlide()
        self.SlideRedMove()
        self.SlideBlueMove()
Ejemplo n.º 23
0
    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()
Ejemplo n.º 24
0
    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()
Ejemplo n.º 25
0
    def BuildWindow(self):
        self.Board = ui.BoardWithTitleBar()
        self.Board.SetPosition(52, 40)
        self.Board.SetSize(300, 380)
        self.Board.SetTitleName("LevelBot")
        self.Board.AddFlag("movable")
        self.Board.SetCloseEvent(self.Close)
        self.Board.Hide()

        comp = UIComponents.Component()
        self.rangeLabel = comp.TextLine(self.Board, "Range", 25, 40,
                                        comp.RGB(255, 255, 255))
        self.slideRange = comp.SliderBar(
            self.Board, float(self.Range / 20000.0), self.OnSlideRange,
            self.rangeLabel.GetLocalPosition()[0] + 40,
            self.rangeLabel.GetLocalPosition()[1] + 5)
        self.rangeNumLabel = comp.TextLine(
            self.Board, self.Range,
            self.slideRange.GetLocalPosition()[0] + 185,
            self.slideRange.GetLocalPosition()[1], comp.RGB(255, 255, 255))
        self.ignoreInWallsBtn = comp.OnOffButton(
            self.Board,
            '\t\t\t\t\t\t\tIgnore Mobs in Walls',
            "Don't attack mobs in walls",
            20,
            80,
            funcState=self.OnIgnoreInWall,
            defaultValue=int(self.ignoreBlockedPosition))
        self.goToCenterBtn = comp.OnOffButton(
            self.Board,
            '\t\t\tGo to center',
            "Go to center when no moobs near",
            170,
            80,
            funcState=self.OnGoToCenter,
            defaultValue=int(self.goToCenter))
        self.goToShopBtn = comp.OnOffButton(self.Board,
                                            '\t\tGo to shop',
                                            "Go to shop when inventory full",
                                            20,
                                            115,
                                            funcState=self.SetShopOnInvFull,
                                            defaultValue=int(
                                                self.allowShopOnFullInv))

        self.EnableButton = comp.OnOffButton(
            self.Board,
            '',
            '',
            0,
            323,
            OffUpVisual='OpenBot/Images/start_0.tga',
            OffOverVisual='OpenBot/Images/start_1.tga',
            OffDownVisual='OpenBot/Images/start_2.tga',
            OnUpVisual='OpenBot/Images/stop_0.tga',
            OnOverVisual='OpenBot/Images/stop_1.tga',
            OnDownVisual='OpenBot/Images/stop_2.tga',
            funcState=self.OnStartStop)
        self.EnableButton.SetWindowHorizontalAlignCenter()

        #Location stuff
        self.labelChanger = comp.TextLine(self.Board, 'Location Changer', 110,
                                          140, comp.RGB(255, 255, 0))
        self.locationActivateBtn = comp.OnOffButton(
            self.Board,
            '\t\t\t\t\tChange location',
            "Change locations based on level",
            20,
            160,
            funcState=self.OnLocationBtnChange,
            defaultValue=int(self.allowLocChanger))
        self.removeLocButton = comp.Button(
            self.Board, 'Remove', 'Remove selected entry', 212, 160,
            self.OnRemoveSelected,
            'd:/ymir work/ui/public/Middle_Button_01.sub',
            'd:/ymir work/ui/public/Middle_Button_02.sub',
            'd:/ymir work/ui/public/Middle_Button_03.sub')
        self.barItems, self.fileListBox, self.ScrollBar = comp.ListBoxEx2(
            self.Board, 20, 187, 235, 100)
        self.levelSlotBar, self.levelEditLine = comp.EditLine(
            self.Board, '', 182, 295, 30, 15, 3)
        self.locationText = comp.TextLine(
            self.Board, 'Current location starting on level ', 27, 295,
            comp.RGB(255, 255, 255))
        self.addLocButton = comp.Button(
            self.Board, 'Add', '', 222, 293, self.OnAddLocation,
            'd:/ymir work/ui/public/small_Button_01.sub',
            'd:/ymir work/ui/public/small_Button_02.sub',
            'd:/ymir work/ui/public/small_Button_03.sub')

        #Init
        self.OnSlideRange()
        self.UpdateLocationList()
Ejemplo n.º 26
0
    def __Load_BindObject(self):
        try:
            self.titleBar = self.GetChild("TitleBar")
            self.titleName = self.GetChild("TitleName")
            self.ItemSlot = self.GetChild("ItemSlot")
            try:
                for key in [
                        "BuyButton", "SellButton", "MiddleTab1", "MiddleTab2",
                        "MiddleTab2", "SmallTab1", "SmallTab2", "SmallTab3"
                ]:
                    self.GetChild(key).Hide()
            except Exception:
                pass
            self.CloseButton = self.GetChild("CloseButton")
        except:
            import exception
            exception.Abort("StoneDialog.__Load_BindObject")

        self.CloseButton.SetText(uiScriptLocale.SHOP_EDIT_SHOP_CANCEL)
        self.CloseButton.SetEvent(ui.__mem_func__(self.Close))
        self.titleName.SetText(uiScriptLocale.SHOP_EDIT_SHOP_WINDOW)
        self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
        self.ItemSlot.SAFE_SetButtonEvent("LEFT", "EMPTY",
                                          self.OnSelectEmptySlot)
        self.ItemSlot.SAFE_SetButtonEvent("LEFT", "EXIST",
                                          self.OnSelectItemSlot)
        self.ItemSlot.SAFE_SetButtonEvent("RIGHT", "EXIST",
                                          self.UnselectItemSlot)
        self.ItemSlot.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        self.ItemSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        self.Edit["Board"] = ui.BoardWithTitleBar()
        self.Edit["Board"].SetSize(150, 100)
        self.Edit["Board"].AddFlag("movable")
        self.Edit["Board"].SetPosition(0, 0)
        self.Edit["Board"].SetTitleName(uiScriptLocale.SHOP_SELECT)
        self.Edit["Board"].SetCloseEvent(self.CloseEdit)
        self.Edit["Board"].Show()

        self.Edit["ChangePrice"] = ui.Button()
        self.Edit["ChangePrice"].SetParent(self.Edit["Board"])
        self.Edit["ChangePrice"].SetPosition(30, 35)
        self.Edit["ChangePrice"].SetUpVisual(
            'd:/ymir work/ui/public/Large_button_01.sub')
        self.Edit["ChangePrice"].SetOverVisual(
            'd:/ymir work/ui/public/Large_button_02.sub')
        self.Edit["ChangePrice"].SetDownVisual(
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.Edit["ChangePrice"].SetText(uiScriptLocale.SHOP_CHANGE_PRICE)
        self.Edit["ChangePrice"].Show()

        self.Edit["Remove"] = ui.Button()
        self.Edit["Remove"].SetParent(self.Edit["Board"])
        self.Edit["Remove"].SetPosition(30, 65)
        self.Edit["Remove"].SetUpVisual(
            'd:/ymir work/ui/public/Large_button_01.sub')
        self.Edit["Remove"].SetOverVisual(
            'd:/ymir work/ui/public/Large_button_02.sub')
        self.Edit["Remove"].SetDownVisual(
            'd:/ymir work/ui/public/Large_button_03.sub')
        self.Edit["Remove"].SetText(uiScriptLocale.SHOP_REMOVE_ITEM)
        self.Edit["Remove"].Show()
Ejemplo n.º 27
0
	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
Ejemplo n.º 28
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()
Ejemplo n.º 29
0
	def LoadUI(self):
		settinginfo.Achievement_Statistic["status"] = 1
		self.Board = ui.BoardWithTitleBar()
		self.Board.SetSize(266, 415) # 266
		self.Board.SetCenterPosition()
		self.Board.AddFlag("movable")
		self.Board.AddFlag("float")
		self.Board.SetTitleName("Achievement-Statistik")
		self.Board.SetCloseEvent(self.__del__)
		self.Board.Show()

		self.itemtooltip = uiToolTip.ItemToolTip()  
		self.itemtooltip.HideToolTip()	

		self.BossButtonUp = ui.Button()
		self.BossButtonUp.SetParent(self.Board)
		self.BossButtonUp.SetPosition(16,33)
		self.BossButtonUp.SetText("")
		self.BossButtonUp.SetUpVisual("d:/ymir work/ui/game/windows/tab_button_large_01.sub")
		self.BossButtonUp.SetOverVisual("d:/ymir work/ui/game/windows/tab_button_large_02.sub")
		self.BossButtonUp.SetDownVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.BossButtonUp.SetEvent(ui.__mem_func__(self.ChangeActionMode), 1)
		self.BossButtonUp.Hide()
		
		self.BossButtonDown = ui.Button()
		self.BossButtonDown.SetParent(self.Board)
		self.BossButtonDown.SetPosition(16,33)
		self.BossButtonDown.SetText("")
		self.BossButtonDown.SetUpVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.BossButtonDown.SetOverVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.BossButtonDown.SetDownVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.BossButtonDown.SetEvent(ui.__mem_func__(self.ChangeActionMode), 1)
		self.BossButtonDown.Show()
		
		self.MetinButtonUp = ui.Button()
		self.MetinButtonUp.SetParent(self.Board)
		self.MetinButtonUp.SetPosition(95,33)
		self.MetinButtonUp.SetText("")
		self.MetinButtonUp.SetUpVisual("d:/ymir work/ui/game/windows/tab_button_large_01.sub")
		self.MetinButtonUp.SetOverVisual("d:/ymir work/ui/game/windows/tab_button_large_02.sub")
		self.MetinButtonUp.SetDownVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.MetinButtonUp.SetEvent(ui.__mem_func__(self.ChangeActionMode), 2)
		self.MetinButtonUp.Show()	
		
		self.MetinButtonDown = ui.Button()
		self.MetinButtonDown.SetParent(self.Board)
		self.MetinButtonDown.SetPosition(95,33)
		self.MetinButtonDown.SetText("")
		self.MetinButtonDown.SetUpVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.MetinButtonDown.SetOverVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.MetinButtonDown.SetDownVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.MetinButtonDown.SetEvent(ui.__mem_func__(self.ChangeActionMode), 2)
		self.MetinButtonDown.Hide()
		
		self.DungeonsButtonUp = ui.Button()
		self.DungeonsButtonUp.SetParent(self.Board)
		self.DungeonsButtonUp.SetPosition(174,33)
		self.DungeonsButtonUp.SetText("")
		self.DungeonsButtonUp.SetUpVisual("d:/ymir work/ui/game/windows/tab_button_large_01.sub")
		self.DungeonsButtonUp.SetOverVisual("d:/ymir work/ui/game/windows/tab_button_large_02.sub")
		self.DungeonsButtonUp.SetDownVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.DungeonsButtonUp.SetEvent(ui.__mem_func__(self.ChangeActionMode), 3)
		self.DungeonsButtonUp.Show()	
		
		self.DungeonsButtonDown = ui.Button()
		self.DungeonsButtonDown.SetParent(self.Board)
		self.DungeonsButtonDown.SetPosition(174,33)
		self.DungeonsButtonDown.SetText("")
		self.DungeonsButtonDown.SetUpVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.DungeonsButtonDown.SetOverVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.DungeonsButtonDown.SetDownVisual("d:/ymir work/ui/game/windows/tab_button_large_03.sub")
		self.DungeonsButtonDown.SetEvent(ui.__mem_func__(self.ChangeActionMode), 3)
		self.DungeonsButtonDown.Hide()

		self.scrollbar = ui.ScrollBar()
		self.scrollbar.SetParent(self.Board)
		self.scrollbar.SetScrollBarSize(340)
		self.scrollbar.SetPosition(255, 55)	
		self.scrollbar.SetMiddleBarSize(float(5) / float(7))
		self.scrollbar.SetScrollEvent(self.__OnScroll)
		self.scrollbar.Hide()
		
		self.ButtonTextLines = ui.TextLine()
		self.ButtonTextLines.SetParent(self.Board)
		self.ButtonTextLines.SetPosition(30,36)
		self.ButtonTextLines.SetText("    Bosse                  Metins              Dungeons")
		self.ButtonTextLines.Show()	

		self.SplitTitleBar = ui.HorizontalBar()
		self.SplitTitleBar.SetParent(self.Board)
		self.SplitTitleBar.Create(235)
		self.SplitTitleBar.SetPosition(16,55)
		self.SplitTitleBar.Show()
		
		self.AchievementError = ui.TextLine()
		self.AchievementError.SetParent(self.Board)
		self.AchievementError.SetPosition(133,80)
		self.AchievementError.SetFontColor(0.9607, 0.2392, 0.0)
		self.AchievementError.SetText("Es wurden keine Achievements gefunden!")
		self.AchievementError.SetHorizontalAlignCenter()
		self.AchievementError.Hide()

			
		i = 0
		height = 75
		max_box = 5
		
		while i < max_box:
		
			self.faceBoxIMG[i] = ui.ImageBox()
			self.faceBoxIMG[i].SetParent(self.Board)
			self.faceBoxIMG[i].SetPosition(17,height)
			self.faceBoxIMG[i].LoadImage("d:/ymir work/ui/game/windows/box_face.sub")
			self.faceBoxIMG[i].Show()

			
			self.DescThinBoard[i] = ui.ThinBoard()
			self.DescThinBoard[i].SetParent(self.Board)
			self.DescThinBoard[i].SetPosition(70,height)
			self.DescThinBoard[i].SetSize(180,60)
			self.DescThinBoard[i].Show()
			
			self.AchievementTitle[i] = ui.TextLine()
			self.AchievementTitle[i].SetParent(self.DescThinBoard[i])
			self.AchievementTitle[i].SetPosition(90,5)
			self.AchievementTitle[i].SetFontColor(0.9607, 0.2392, 0.0)
			self.AchievementTitle[i].SetText("Metin des Kummers")
			self.AchievementTitle[i].SetHorizontalAlignCenter()
			self.AchievementTitle[i].Show()
			
			self.AchievementText[i] = ui.TextLine()
			self.AchievementText[i].SetParent(self.DescThinBoard[i])
			self.AchievementText[i].SetPosition(90,20)
			self.AchievementText[i].SetText("Anzahl: 30.000 | Punkte: 10")
			self.AchievementText[i].SetHorizontalAlignCenter()
			self.AchievementText[i].Show()	
			
			self.AchievementCalcPoints[i] = ui.TextLine()
			self.AchievementCalcPoints[i].SetParent(self.DescThinBoard[i])
			self.AchievementCalcPoints[i].SetPosition(90,35)
			self.AchievementCalcPoints[i].SetText("Bisher erhaltene Punkte: 13.400.032")
			self.AchievementCalcPoints[i].SetHorizontalAlignCenter()
			self.AchievementCalcPoints[i].Show()			

			height = height + 65
			i = i + 1
		
		self.cat = 1
		self.ClearBoards()
		self.LoadCategory()
Ejemplo n.º 30
0
    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)