Exemplo n.º 1
0
	def OnInput(self):

		self.needInputString = True

		event.AddEventSetLocalYPosition(self.descIndex, 5+10)
		yPos = event.GetEventSetLocalYPosition(self.descIndex)

		self.editSlot = ui.SlotBar()
		self.editSlot.SetSize(200, 18)
		self.editSlot.SetPosition(0, yPos)
		self.editSlot.SetParent(self.board)
		self.editSlot.SetWindowHorizontalAlignCenter()
		self.editSlot.Show()

		self.editLine = ui.EditLine()
		self.editLine.SetParent(self.editSlot)
		self.editLine.SetPosition(3, 3)
		self.editLine.SetSize(200, 17)
		self.editLine.SetMax(30)
		self.editLine.SetFocus()
		self.editLine.Show()

		event.AddEventSetLocalYPosition(self.descIndex, 25+10)

		self.MakeNextButton(event.BUTTON_TYPE_DONE)

		self.editLine.UpdateRect()
		self.editSlot.UpdateRect()
		self.board.UpdateRect()
Exemplo n.º 2
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()
Exemplo n.º 3
0
 def OnlyEditLine(self, parent, width, heigh, x, y, editlineText, max):
     Value = ui.EditLine()
     if parent != None:
         Value.SetParent(parent)
     Value.SetSize(width, heigh)
     Value.SetPosition(x, y)
     Value.SetMax(max)
     Value.SetText(editlineText)
     Value.SetNumberMode()
     Value.Show()
     return Value
Exemplo n.º 4
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()
Exemplo n.º 5
0
 def CreateEditLine(self, parent, text, x, y, width, heigh, max):
     SlotBar = self.CreateSlotBar(parent, x, y, width, heigh)
     Value = ui.EditLine()
     Value.SetParent(SlotBar)
     Value.SetSize(width, heigh)
     Value.SetPosition(3, 1)
     Value.SetMax(max)
     Value.SetLimitWidth(width)
     Value.SetMultiLine()
     Value.SetText(text)
     Value.Show()
     return SlotBar, Value
Exemplo n.º 6
0
	def EditLine(self, parent, text, x, y, width, heigh, max):
		tmpEditLine = ui.EditLine()
		
		if parent:
			tmpEditLine.SetParent(parent)
		
		tmpEditLine.SetSize(width, heigh)
		tmpEditLine.SetPosition(x, y)
		tmpEditLine.SetMax(max)
		tmpEditLine.SetLimitWidth(width)
		tmpEditLine.SetMultiLine()
		tmpEditLine.SetText(text)
		
		tmpEditLine.Show()
		return tmpEditLine
Exemplo n.º 7
0
 def EditLine(self, parent, editlineText, x, y, width, heigh, max):
     SlotBar = ui.SlotBar()
     if parent != None:
         SlotBar.SetParent(parent)
     SlotBar.SetSize(width, heigh)
     SlotBar.SetPosition(x, y)
     SlotBar.Show()
     Value = ui.EditLine()
     Value.SetParent(SlotBar)
     Value.SetSize(width, heigh)
     Value.SetPosition(1, 1)
     Value.SetMax(max)
     Value.SetLimitWidth(width)
     Value.SetMultiLine()
     Value.SetText(editlineText)
     Value.Show()
     return SlotBar, Value
Exemplo n.º 8
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()