Exemple #1
0
    def BuildWindow(self):
        self.Board = ui.ExpandedImageBox()
        self.Board.AddFlag("movable")
        self.Board.AddFlag("float")
        self.Board.LoadImage("schicksal/schicksal_board.tga")
        self.Board.SetCenterPosition()
        self.Board.Show()

        self.Wheel = ui.ExpandedImageBox()
        self.Wheel.SetParent(self.Board)
        self.Wheel.LoadImage("schicksal/schicksal_rad.tga")
        self.Wheel.SetPosition(15, 45)
        self.Wheel.AddFlag("not_pick")
        self.Wheel.Show()

        self.CloseButton = ui.Button()
        self.CloseButton.SetParent(self.Board)
        self.CloseButton.SetEvent(ui.__mem_func__(self.ClosePacket))
        self.CloseButton.SetPosition(605, 45)
        self.CloseButton.SetUpVisual(
            "d:/ymir work/ui/public/close_button_01.sub")
        self.CloseButton.SetOverVisual(
            "d:/ymir work/ui/public/close_button_02.sub")
        self.CloseButton.SetDownVisual(
            "d:/ymir work/ui/public/close_button_03.sub")
        self.CloseButton.Show()

        self.SlotBg = ui.ExpandedImageBox()
        self.SlotBg.SetParent(self.Board)
        self.SlotBg.SetPosition(553, 127)
        self.SlotBg.LoadImage("schicksal/slot.tga")
        self.SlotBg.AddFlag("not_pick")
        self.SlotBg.Show()

        self.Button = ui.Button()
        self.Button.SetParent(self.Wheel)
        self.Button.SetUpVisual("schicksal/schicksal_drehen_normal.tga")
        self.Button.SetOverVisual("schicksal/schicksal_drehen_over.tga")
        self.Button.SetDownVisual("schicksal/schicksal_drehen_down.tga")
        self.Button.SetPosition(177, 181)
        self.Button.SetEvent(lambda: net.WheelPacket(2))
        self.Button.Show()

        self.Yang = ui.TextLine()
        self.Yang.SetParent(self.Board)
        self.Yang.SetPosition(57, 576)
        self.Yang.SetFontColor(0.5, 1.0, 0.5)
        self.Yang.SetFontName("Arial:16")
        self.Yang.Show()

        self.FreeSpin = ui.TextLine()
        self.FreeSpin.SetParent(self.Board)
        self.FreeSpin.SetPosition(450, 574)
        self.FreeSpin.SetFontColor(0.5, 1.0, 0.5)
        self.FreeSpin.SetFontName("Arial:20")
        self.FreeSpin.Show()
        def AppendItem(self, questName, questIndex):
            for i in xrange(len(self.__questList)):
                if self.__questList[i].text.GetText(
                ) == questName and self.__questList[i].questIndex == questIndex:
                    return

            bar = ui.Bar()
            bar.SetParent(self.__parentWnd)
            bar.SetSize(100, 10)
            bar.SetColor(grp.GenerateColor(1.0, 1.0, 1.0, 0.0))
            bar.OnMouseLeftButtonDown = lambda x=len(
                self.__questList), arg=questIndex: self.__SelectQuest(x, arg)
            bar.Hide()

            bar.btn = ui.Button()
            bar.btn.SetParent(bar)
            bar.btn.SetUpVisual("Other/questcategory/quest_checkbox.tga")
            bar.btn.SetOverVisual("Other/questcategory/quest_checkbox.tga")
            bar.btn.SetDownVisual("Other/questcategory/quest_checkbox.tga")
            bar.btn.SetPosition(0, 0)
            bar.btn.Show()

            bar.checked = ui.ImageBox()
            bar.checked.SetParent(bar.btn)
            bar.checked.LoadImage("Other/questcategory/quest_checked.tga")
            bar.checked.SetPosition(0, -2)
            bar.checked.Hide()

            bar.text = ui.TextLine()
            bar.text.SetParent(bar)
            bar.text.SetText(questName)
            bar.text.SetPosition(15, -2)
            bar.text.SetWindowHorizontalAlignLeft()
            bar.text.SetHorizontalAlignLeft()
            bar.text.Show()

            bar.text.clock = ui.TextLine()
            bar.text.clock.SetParent(bar.text)
            bar.text.clock.SetText(localeInfo.QUEST_UNLIMITED_TIME)
            bar.text.clock.SetPosition(5, 10)
            bar.text.clock.SetWindowHorizontalAlignLeft()
            bar.text.clock.SetHorizontalAlignLeft()
            bar.text.clock.Show()

            bar.text.counter = ui.TextLine()
            bar.text.counter.SetParent(bar.text)
            bar.text.counter.SetText("")
            bar.text.counter.SetPosition(5, 20)
            bar.text.counter.SetWindowHorizontalAlignLeft()
            bar.text.counter.SetHorizontalAlignLeft()
            bar.text.counter.Show()

            bar.questIndex = questIndex

            self.__questList[len(self.__questList)] = bar
Exemple #3
0
    def LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/AtlasWindow.py")
        except:
            exception.Abort("AtlasWindow.LoadWindow.LoadScript")

        try:
            self.board = self.GetChild("board")
            self.board.SetTitleName("Teleporthack")

        except:
            exception.Abort("AtlasWindow.LoadWindow.BindObject")

        self.AtlasMainWindow = self.AtlasRenderer()
        self.board.SetCloseEvent(self.Hide)
        self.AtlasMainWindow.SetParent(self.board)
        self.AtlasMainWindow.SetPosition(7, 30)
        self.tooltipInfo.SetParent(self.board)
        self.SetPosition(52, 40)

        self.Line = ui.Line()
        self.Line.SetParent(self)
        self.Line.SetColor(0xff777777)
        self.Line.Show()

        self.ModeText = ui.TextLine()
        self.ModeText.SetParent(self)
        self.ModeText.SetText("Mode:")
        self.ModeText.Show()

        self.PositionText = ui.TextLine()
        self.PositionText.SetParent(self)
        self.PositionText.SetFontColor(1.0, 0.8,
                                       0)  #SetFontColor(0.2, 0.2, 1.0)
        self.PositionText.SetText("(200, 800)")
        self.PositionText.Show()

        global TeleportHackMode
        self.ModeButton = ui.Button()
        self.ModeButton.SetParent(self)
        self.ModeButton.SetUpVisual(
            "d:/ymir work/ui/public/middle_button_01.sub")
        self.ModeButton.SetOverVisual(
            "d:/ymir work/ui/public/middle_button_02.sub")
        self.ModeButton.SetDownVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.ModeButton.SetText(TeleportHackMode)
        self.ModeButton.SetEvent(lambda: self.ChangeMode())
        self.ModeButton.Show()

        self.Hide()
Exemple #4
0
    def CheckBonus(self, bonus, bonuslist, offset):
        for boni in bonuslist:
            if bonus[0] == boni:
                try:
                    Index = bonuslist.index(boni)
                    BonusDescription = ui.TextLine()
                    BonusDescription.SetParent(self.Board)
                    BonusDescription.SetPosition(offset[Index][0] + 20,
                                                 offset[Index][1] + 35)
                    BonusDescription.SetText(str(bonus[0]))
                    BonusDescription.Show()

                    BonusSlotBar = ui.SlotBar()
                    BonusSlotBar.SetParent(self.Board)
                    BonusSlotBar.SetSize(115, 15)
                    BonusSlotBar.SetPosition(offset[Index][0] + 20,
                                             offset[Index][1] + 15 + 35)
                    BonusSlotBar.Show()

                    BonusAttrLine = ui.TextLine()
                    BonusAttrLine.SetParent(self.Board)
                    BonusAttrLine.SetPosition(offset[Index][0] + 5 + 20,
                                              offset[Index][1] + 15 + 35)

                    try:
                        Type = self.SpecialBoni[bonus[1]]
                        Attribute = self.EquipAttribute(bonus)
                    except:
                        Attribute = fgGHGjjFHJghjfFG1545gGG.GetStatus(
                            int(bonus[2]))
                    if self.TestSystem != 1:
                        BonusAttrLine.SetText(str(Attribute))
                        # try:
                        # if int(Attribute) >= int(self.MaxBoni[str(bonus[1])]):
                        # BonusAttrLine.SetFontColor(1.0, 0.63, 0)
                        # else:
                        # BonusAttrLine.SetFontColor(1, 1, 1)
                        # except:
                        # BonusAttrLine.SetFontColor(1, 1, 1)
                    else:
                        BonusAttrLine.SetText("Test system is active")
                        BonusAttrLine.SetFontColor(0.1, 0.7, 1.0)

                    BonusAttrLine.Show()
                    self.BonusList.append(
                        [BonusDescription, BonusAttrLine, BonusSlotBar])
                except:
                    pass
Exemple #5
0
	def CreateAccount(self, i):
		image = ui.ImageBox()
		image.SetParent(self.GetChild("board"))
		image.SetPosition(85, self.position[1])
		image.LoadImage("tbx/loginwindow/slotbar_small.tga")
		image.Show()
		text = ui.TextLine()
		text.SetParent(image)
		text.SetPosition(2, 0)
		text.SetHorizontalAlignCenter()
		text.SetVerticalAlignCenter()
		text.SetWindowHorizontalAlignCenter()
		text.SetWindowVerticalAlignCenter()
		text.SetText(get_reg("acc_%d" % i).split("|")[0])
		text.Show()
		button = ui.Button()
		button.SetParent(self.GetChild("board"))
		button.SetPosition(100, self.position[1]+35)
		button.SetUpVisual("tbx/loginwindow/load_0.tga")
		button.SetOverVisual("tbx/loginwindow/load_1.tga")
		button.SetDownVisual("tbx/loginwindow/load_2.tga")
		button.SetEvent(ui.__mem_func__(self.LoadAccount), i)
		button.Show()
		
		self.position[1] += 75
		self.accountLabel[i] = (image, button, text)
Exemple #6
0
    def AutoAppendTextLine(self, text, color=FONT_COLOR, centerAlign=True):
        textLine = ui.TextLine()
        textLine.SetParent(self)
        textLine.SetFontName(self.defFontName)
        textLine.SetPackedFontColor(color)
        textLine.SetText(text)
        textLine.SetOutline()
        textLine.SetFeather(False)
        textLine.Show()

        if centerAlign:
            textLine.SetPosition(self.toolTipWidth / 2, self.toolTipHeight)
            textLine.SetHorizontalAlignCenter()

        else:
            textLine.SetPosition(10, self.toolTipHeight)

        self.childrenList.append(textLine)

        (textWidth, textHeight) = textLine.GetTextSize()

        textWidth += 40
        textHeight += 5

        if self.toolTipWidth < textWidth:
            self.toolTipWidth = textWidth

        self.toolTipHeight += textHeight

        return textLine
Exemple #7
0
    def LoadUI(self):
        settinginfo.BonusBoardOpen = 1
        self.Board = ui.BoardWithRoofBar()
        self.Board.SetSize(313, 400)
        self.Board.SetCenterPosition()
        self.Board.AddFlag("movable")
        self.Board.AddFlag("float")
        # self.Board.SetTitleName("BonusBoard")
        self.Board.SetCloseEvent(self.__del__)
        self.Board.Show()

        Vertical = ui.Line()
        Vertical.SetParent(self.Board)
        Vertical.SetPosition(8 + 15, 90)
        Vertical.SetSize(297, 0)
        Vertical.SetColor(CTOA("ff777777"))
        Vertical.Show()
        self.UI.append(Vertical)

        VerticalBottom = ui.Line()
        VerticalBottom.SetParent(self.Board)
        VerticalBottom.SetPosition(8 + 15, 390 + 35)
        VerticalBottom.SetSize(297, 0)
        VerticalBottom.SetColor(CTOA("ff777777"))
        VerticalBottom.Show()
        self.UI.append(VerticalBottom)

        x = 75
        for i in xrange(2):
            ChangeBonusDict = ui.Button()
            ChangeBonusDict.SetParent(self.Board)
            ChangeBonusDict.SetUpVisual("yamato_helpboard/normal_button_n.tga")
            ChangeBonusDict.SetOverVisual(
                "yamato_helpboard/normal_button_h.tga")
            ChangeBonusDict.SetDownVisual(
                "yamato_helpboard/normal_button_p.tga")
            ChangeBonusDict.SetDisableVisual(
                "yamato_helpboard/normal_button_d.tga")
            ChangeBonusDict.SetText(self.BonusDict[i])
            ChangeBonusDict.SetPosition(x, 400 + 32)
            ChangeBonusDict.SetEvent(lambda arg=ChangeBonusDict.GetText(): self
                                     .ChangeBonusDict(arg))
            ChangeBonusDict.Show()
            x += 100
            self.UI.append(ChangeBonusDict)

        x = 85
        Type = ["Angriff", "Verteidigung"]
        for i in xrange(2):
            BonusDescription = ui.TextLine()
            BonusDescription.SetParent(self.Board)
            BonusDescription.SetPosition(x, 65)
            BonusDescription.SetText(str(Type[i]))
            BonusDescription.SetFontColor(1.0, 0.63, 0)
            BonusDescription.Show()
            x += 130
            self.UI.append(BonusDescription)

        self.SetBoni(self.BonusDict[0])
        self.dict = self.BonusDict[0]
Exemple #8
0
 def __CreateTextLine(self, fileName):
     textLine = ui.TextLine()
     textLine.SetParent(self)
     textLine.SetPosition(1, 2)
     textLine.SetText(fileName)
     textLine.Show()
     return textLine
Exemple #9
0
    def SetProgress(self, current, max):
        try:
            self.progress = min(
                math.ceil((float(current) / float(max)) * 100.00), 100)
        except:
            self.progress = 0
        if self.progress == 100:
            self.isFinished = True
        else:
            self.isFinished = False

        if not self.textLine:
            textLine = ui.TextLine()
            textLine.SetParent(self)
            textLine.SetOutline()
            textLine.Show()
            self.textLine = textLine

        if current > max:
            self.textLine.SetText('%d/%d' % (max, max))
        else:
            self.textLine.SetText('%d/%d' % (current, max))
        self.textLine.SetPosition(170, self.GetHeight() / 2)
        self.textLine.SetHorizontalAlignCenter()
        self.textLine.SetWindowHorizontalAlignCenter()
        self.textLine.SetVerticalAlignCenter()
Exemple #10
0
 def __CreateTextLine(self, text):
     textLine = ui.TextLine()
     textLine.SetParent(self)
     textLine.SetPosition(0, 0)
     textLine.SetText(text)
     textLine.Show()
     return textLine
 def __init__(self, parent, text, value=0):
     ui.ListBoxEx.Item.__init__(self)
     self.textBox = ui.TextLine()
     self.textBox.SetParent(self)
     self.textBox.SetText(text)
     self.textBox.Show()
     self.value = value
Exemple #12
0
    def AppendMaterial(self, vnum, count):
        slot = self.__MakeSlot()
        slot.SetParent(self)
        slot.SetPosition(15, self.dialogHeight)

        itemImage = self.__MakeItemImage()
        itemImage.SetParent(slot)
        item.SelectItem(vnum)
        itemImage.LoadImage(item.GetIconImageFileName())

        thinBoard = self.__MakeThinBoard()
        thinBoard.SetPosition(50, self.dialogHeight)
        thinBoard.SetSize(191, 20)

        textLine = ui.TextLine()
        textLine.SetParent(thinBoard)
        textLine.SetFontName(localeInfo.UI_DEF_FONT)
        textLine.SetPackedFontColor(0xffdddddd)
        textLine.SetText("%s x %02d" % (item.GetItemName(), count))
        textLine.SetOutline()
        textLine.SetFeather(False)
        textLine.SetWindowVerticalAlignCenter()
        textLine.SetVerticalAlignCenter()

        if localeInfo.IsARABIC():
            (x, y) = textLine.GetTextSize()
            textLine.SetPosition(x, 0)
        else:
            textLine.SetPosition(15, 0)

        textLine.Show()
        self.children.append(textLine)

        self.dialogHeight += 34
        self.UpdateDialog()
Exemple #13
0
		def __CreateTextLine(self, text, pos):
			textLine=ui.TextLine()
			textLine.SetParent(self)
			textLine.SetPosition(pos[0], pos[1])
			textLine.SetText(text)
			textLine.Show()
			return textLine
    def MakeSlot(self):
        self.toolTip = uiToolTip.ItemToolTip()
        self.toolTip.HideToolTip()

        y = 0
        for i in xrange(3):
            self.backgroundSlotImage[i] = ui.ImageBox()
            self.backgroundSlotImage[i].SetParent(self)
            self.backgroundSlotImage[i].SetPosition(0, y)
            self.backgroundSlotImage[i].LoadImage(self.BACKGROUND_SLOT)
            self.backgroundSlotImage[i].Hide()
            y = y + 32

        self.itemImage = ui.ImageBox()
        self.itemImage.SetParent(self)
        self.itemImage.SetPosition(0, 0)
        self.itemImage.SAFE_SetStringEvent("MOUSE_OVER_IN", self.ShowToolTip)
        self.itemImage.SAFE_SetStringEvent("MOUSE_OVER_OUT", self.HideToolTip)
        self.itemImage.Show()

        self.itemCountTextLine = ui.TextLine()
        self.itemCountTextLine.SetParent(self)
        self.itemCountTextLine.SetPosition(16, 32 - 15)
        self.itemCountTextLine.SetText("100/100")
        self.itemCountTextLine.SetOutline()
        self.itemCountTextLine.SetFontColor(0.9, 0.4745, 0.4627)
        self.itemCountTextLine.SetHorizontalAlignCenter()
        self.itemCountTextLine.Show()
Exemple #15
0
	def MakeButton(self, index, parent, x, y):
		self.tab[index] = ui.MakeButton(parent, x, y, False, "d:/ymir work/battle_pass/", "tab_normal.tga", "tab_select.tga", "tab_normal.tga")
		self.gauge[index] = ui.MakeGauge(self.tab[index], 41, 23, 130)
		self.gauge_f = ui.MakeGauge(parent, 326, 235, 92)
		self.text[index] = ui.TextLine()
		self.text[index].SetParent(self.tab[index])
		self.text[index].SetPosition(50, 8)
		self.text[index].SetText(str(constInfo.info_missions_bp[int(index)]["Name"]))
		self.text[index].Show()
		
		self.reward1[index] = ui.MakeGridSlot(self.tab[index], 180+7, 2+4, self.Get3(index, "iVnum1"), self.Get3(index, "iCount1"))
		self.reward1[index].SetOverInItemEvent(lambda slotindex = 0, ivnumz = index: self.OverInItem(slotindex, ivnumz, "iVnum1"))
		self.reward1[index].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
		
		self.reward2[index] = ui.MakeGridSlot(self.tab[index], 180+32+7, 2+4, self.Get3(index, "iVnum2"), self.Get3(index, "iCount2"))
		self.reward2[index].SetOverInItemEvent(lambda slotindex = 0, ivnumz = index: self.OverInItem(slotindex, ivnumz, "iVnum2"))
		self.reward2[index].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
		
		self.reward3[index] = ui.MakeGridSlot(self.tab[index], 217+28+7, 2+4, self.Get3(index, "iVnum3"), self.Get3(index, "iCount3"))
		self.reward3[index].SetOverInItemEvent(lambda slotindex = 0, ivnumz = index: self.OverInItem(slotindex, ivnumz, "iVnum3"))
		self.reward3[index].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
		
		self.icon[index] = ui.MakeImageBoxNoImg(self.tab[index], 1, 2)
		if self.Get(index, "iType") == 1: # Category: Use Items
			item.SelectItem(self.Get(index, "iVnum"))
			self.icon[index].LoadImage(item.GetIconImageFileName())
		if self.Get(index, "iType") > 2:
			self.icon[index].LoadImage(self.Type_Images[self.Get(index, "iType")])
Exemple #16
0
 def __MakeTextLine(self):
     self.textLine = ui.TextLine()
     self.textLine.SetParent(self)
     self.textLine.SetWindowHorizontalAlignCenter()
     self.textLine.SetWindowVerticalAlignCenter()
     self.textLine.SetHorizontalAlignCenter()
     self.textLine.SetVerticalAlignCenter()
     self.textLine.Show()
    def initData(self):
        if self.Loaded > 0:
            self.Show()
            return

        self.Loaded = 1

        self.MainBGThinBoard = ui.ImageBox()
        self.MainBGThinBoard.SetParent(self)
        self.MainBGThinBoard.SetPosition(0, 0)
        self.MainBGThinBoard.LoadImage("yamato_achievement/achievement_" +
                                       app.GetLanguage() + "_background.tga")
        self.MainBGThinBoard.Show()

        self.faceBoxIMG = ui.ImageBox()
        self.faceBoxIMG.SetParent(self.MainBGThinBoard)
        self.faceBoxIMG.SetPosition(5 + 12, 7 + 20)
        self.faceBoxIMG.Show()

        self.AchievementTitle = ui.TextLine()
        self.AchievementTitle.SetParent(self.MainBGThinBoard)
        self.AchievementTitle.SetPosition(170, 8 + 20)
        self.AchievementTitle.SetHorizontalAlignCenter()
        self.AchievementTitle.SetFontColor(0.9607, 0.2392, 0.0)
        self.AchievementTitle.Show()

        self.AchievementText = ui.TextLine()
        self.AchievementText.SetParent(self.MainBGThinBoard)
        self.AchievementText.SetPosition(170, 25 + 20)
        self.AchievementText.SetHorizontalAlignCenter()
        self.AchievementText.Show()

        self.AchievementPointsText = ui.TextLine()
        self.AchievementPointsText.SetParent(self.MainBGThinBoard)
        self.AchievementPointsText.SetPosition(100, 40 + 20)
        self.AchievementPointsText.SetText(
            localeInfo.ACHIEVEMENT_UI_POINTS_TEXT)
        self.AchievementPointsText.Show()

        self.AchievementPointsTextPoints = ui.TextLine()
        self.AchievementPointsTextPoints.SetParent(self.MainBGThinBoard)
        self.AchievementPointsTextPoints.SetPosition(216, 40 + 20)
        self.AchievementPointsTextPoints.SetFontColor(1.0, 0.7843, 0.0)
        self.AchievementPointsTextPoints.Show()

        self.Hide()
Exemple #18
0
    def __MakeBoard(self):
        self.Board = ui.Board()
        self.Board.SetParent(self)
        self.Board.SetSize(self.GetWidth(), self.GetHeight())
        self.Board.SetPosition(0, 0)
        self.Board.AddFlag("movable")
        self.Board.Show()

        self.TitleBar = ui.TitleBar()
        self.TitleBar.SetParent(self.Board)
        self.TitleBar.SetPosition(7, 7)
        self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red')
        self.TitleBar.SetCloseEvent(self.Close)
        self.TitleBar.Show()

        self.TitleText = ui.TextLine()
        self.TitleText.SetParent(self.TitleBar)
        self.TitleText.SetPosition(0, 4)
        self.TitleText.SetText("|cff00FFFFAlege sexul|h|r")
        self.TitleText.SetWindowHorizontalAlignCenter()
        self.TitleText.SetHorizontalAlignCenter()
        self.TitleText.Show()

        self.bg0 = ui.ImageBox()
        self.bg0.SetParent(self.Board)
        self.bg0.SetPosition(5, 35)
        self.bg0.LoadImage("change_race/faces/icon_mshaman.tga")
        self.bg0.Show()

        self.bg1 = ui.ImageBox()
        self.bg1.SetParent(self.Board)
        self.bg1.SetPosition(75, 35)
        self.bg1.LoadImage("change_race/faces/icon_wshaman.tga")
        self.bg1.Show()

        self.btn0 = ui.Button()
        self.btn0.SetParent(self.Board)
        self.btn0.SetPosition(12, 170)
        self.btn0.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn0.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn0.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn0.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn0.SetText("Alege")
        self.btn0.SetEvent(lambda: self.__choose_shaman_m())
        self.btn0.Show()

        self.btn1 = ui.Button()
        self.btn1.SetParent(self.Board)
        self.btn1.SetPosition(82, 170)
        self.btn1.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
        self.btn1.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
        self.btn1.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
        self.btn1.SetDisableVisual(
            "d:/ymir work/ui/public/middle_button_03.sub")
        self.btn1.SetText("Alege")
        self.btn1.SetEvent(lambda: self.__choose_shaman_f())
        self.btn1.Show()
Exemple #19
0
        def __init__(self, parent, text, value=0):
            ui.ListBoxEx.Item.__init__(self)

            self.textBox = ui.TextLine()
            self.textBox.SetParent(self)
            self.textBox.SetText(text)
            # self.textBox.SetLimitWidth(parent.GetWidth()-132)
            self.textBox.Show()
            self.value = value
Exemple #20
0
		def __init__(self):
			ui.Window.__init__(self, "TOP_MOST")
			self.SetWindowName("EnergyBar")
			textLine = ui.TextLine()
			textLine.SetParent(self)
			textLine.SetHorizontalAlignCenter()
			textLine.SetOutline()
			textLine.Show()
			self.textLine = textLine
Exemple #21
0
 def CreateTextLine(self, parent, x, y, text, align="center"):
     textline = ui.TextLine()
     textline.SetParent(parent)
     textline.SetPosition(x, y)
     textline.SetText(text)
     if align == "center":
         textline.SetHorizontalAlignCenter()
     textline.Show()
     return textline
	def initData(self):
		if self.Loaded > 0:
			self.Show()
			return
		
		self.Loaded = 1
		
		self.Background = ui.Bar()
		self.Background.SetParent(self)
		self.Background.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
		self.Background.SetPosition(0,0)
		self.Background.SetColor(grp.GenerateColor(0.0,0.0,0.0,150.0/255.0))
		self.Background.Show()
		self.MainImage = ui.ImageBox()
		self.MainImage.SetParent(self.Background)
		self.MainImage.LoadImage("d:/ymir work/ui/main.tga")
		self.MainImage.SetSize(642,600)
		self.MainImage.SetCenterPosition()
		self.MainImage.Show()
		
		self.CloseButton = ui.Button()
		self.CloseButton.SetParent(self)
		self.CloseButton.SetPosition(wndMgr.GetScreenWidth()/2-350, wndMgr.GetScreenHeight()/2+200)
		self.CloseButton.SetUpVisual("d:/ymir work/ui/close_n.tga")
		self.CloseButton.SetOverVisual("d:/ymir work/ui/close_h.tga")
		self.CloseButton.SetDownVisual("d:/ymir work/ui/close_a.tga")
		self.CloseButton.SetEvent(ui.__mem_func__(self.Open))
		self.CloseButton.Show()
		
		self.MapName = ui.ImageBox()
		self.MapName.SetParent(self)
		self.MapName.SetPosition(wndMgr.GetScreenWidth()/2+300, wndMgr.GetScreenHeight()/2+200)
		self.MapName.LoadImage("d:/ymir work/ui/info.tga")
		self.MapName.SetSize(162,50)
		self.MapName.Hide()
		
		self.MapNameText = ui.TextLine()
		self.MapNameText.SetParent(self.MapName)
		self.MapNameText.SetHorizontalAlignCenter()
		self.MapNameText.SetPosition(81,18)
		self.MapNameText.SetText("Teleportieren")
		self.MapNameText.Show()

		points = [[72,82],[94,172],[52,257],[124,232],[239,204],[301,153],[70,307],[157,326],[198,282],[322,199],[365,178],[419,98],[484,120],[540,153],[539,221],[454,199],[415,237],[452,261],[447,297],[457,365],[499,377],[517,412],[435,442],[368,497],[404,545],[258,370],[201,397],[304,282],[419,361],[367,300],[520,315]]
		self.data = []
		for pos in xrange(len(points)):
			button = ui.Button()
			button.SetParent(self.MainImage)
			button.SetPosition(points[pos][0],points[pos][1])
			button.SetUpVisual("d:/ymir work/ui/click_n.tga")
			button.SetOverVisual("d:/ymir work/ui/click_h.tga")
			button.SetDownVisual("d:/ymir work/ui/click_a.tga")
			button.SetEvent(ui.__mem_func__(self.WarpPosition),pos)
			button.Show()
			self.data.append(button)
		self.Show()
Exemple #23
0
 def LargeTextLine(self, parent, textlineText, x, y, color):
     textline = ui.TextLine()
     if parent != None:
         textline.SetParent(parent)
     textline.SetPosition(x, y)
     textline.SetFontName(locale.UI_DEF_FONT_LARGE)
     textline.SetPackedFontColor(color)
     textline.SetText(textlineText)
     textline.Show()
     return textline
Exemple #24
0
    def __init__(self):
        ui.Window.__init__(self)

        textLine = ui.TextLine()
        textLine.SetParent(self)
        textLine.SetHorizontalAlignCenter()
        textLine.SetOutline()
        textLine.SetHorizontalAlignRight()
        textLine.Show()
        self.textLine = textLine
Exemple #25
0
		def __init__(self, y):
			ui.Window.__init__(self, "TOP_MOST")

			textLine = ui.TextLine()
			textLine.SetParent(self)
			textLine.SetHorizontalAlignLeft()
			textLine.SetOutline()
			textLine.Show()
			self.y = y
			self.textLine = textLine
Exemple #26
0
 def TextLine(self, parent, textlineText, x, y, color):
     textline = ui.TextLine()
     if parent != None:
         textline.SetParent(parent)
     textline.SetPosition(x, y)
     if color != None:
         textline.SetFontColor(color[0], color[1], color[2])
     textline.SetText(textlineText)
     textline.Show()
     return textline
	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()
Exemple #28
0
            def AppendTextLine(self, text):
                textLine = ui.TextLine()
                textLine.SetParent(self)
                textLine.SetWindowHorizontalAlignCenter()
                textLine.SetHorizontalAlignCenter()
                textLine.SetText(text)
                textLine.SetPosition(0, self.yPos)
                textLine.Show()

                self.children.append(textLine)
                self.yPos += 17
Exemple #29
0
    def SetText(self, text):
        if not self.textLineExtra:
            textLineExtra = ui.TextLine()
            textLineExtra.SetParent(self)
            textLineExtra.SetPosition(12, self.GetHeight() / 2)
            textLineExtra.SetVerticalAlignCenter()
            textLineExtra.SetOutline()
            textLineExtra.Show()
            self.textLineExtra = textLineExtra

        self.textLineExtra.SetText('%s' % text)
Exemple #30
0
	def TextLine(self, parent, text, x, y):
		tmpText = ui.TextLine()
		
		if parent:
			tmpText.SetParent(parent)
			
		tmpText.SetPosition(x, y)
		tmpText.SetText(text)
		
		tmpText.Show()
		return tmpText