Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
        def MakeImage(self):
            top = ui.ImageBox()
            top.SetParent(self)
            top.LoadImage(
                "locale/de/ui/interfaces/ingame_shops/vscrollbar_top.tga")
            top.SetPosition(0, 0)
            top.AddFlag("not_pick")
            top.Show()
            bottom = ui.ImageBox()
            bottom.SetParent(self)
            bottom.LoadImage(
                "locale/de/ui/interfaces/ingame_shops/vscrollbar_bottom.tga")
            bottom.AddFlag("not_pick")
            bottom.Show()

            middle = ui.ExpandedImageBox()
            middle.SetParent(self)
            middle.LoadImage(
                "locale/de/ui/interfaces/ingame_shops/vscrollbar_middle.tga")
            middle.SetPosition(0, 4)
            middle.AddFlag("not_pick")
            middle.Show()

            self.top = top
            self.bottom = bottom
            self.middle = middle
Ejemplo n.º 3
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()
Ejemplo n.º 4
0
	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()
Ejemplo n.º 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)
Ejemplo n.º 6
0
 def __LoadImage(self, x, y, fileName):
     img = ui.ImageBox()
     img.SetParent(self)
     img.AddFlag("not_pick")
     img.LoadImage(fileName)
     img.SetPosition(x, y)
     img.Show()
     return img
Ejemplo n.º 7
0
    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()
Ejemplo n.º 8
0
	def SetElementImage(self,elementId):
		try:
			if elementId > 0 and elementId in ELEMENT_IMAGE_DIC.keys():
				self.elementImage = ui.ImageBox()
				self.elementImage.SetParent(self.name)
				self.elementImage.SetPosition(-60,-12)
				self.elementImage.LoadImage("d:/ymir work/ui/game/12zi/element/%s.sub" % (ELEMENT_IMAGE_DIC[elementId]))
				self.elementImage.Show()
		except:
			pass
Ejemplo n.º 9
0
        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
Ejemplo n.º 10
0
	def ImageBox(self, parent, image, x, y):
		tmpImage = ui.ImageBox()
		
		if parent:
			tmpImage.SetParent(parent)
		
		tmpImage.LoadImage(image)
		tmpImage.SetPosition(x, y)
		
		tmpImage.Show()
		return tmpImage
    def __init__(self):
        # window: without a window with size = 0 x 0 you won't be able to click there if it's shown
        bgWindow = ui.Window()
        bgWindow.Hide()
        self.bgWindow = bgWindow
        showingImage = ui.ImageBox()
        showingImage.SetParent(self.bgWindow)
        showingImage.LoadImage(
            "locale/%s/ui/game/achievement/reward_shower.tga" %
            (app.GetLocaleName()))
        showingImage.SetPosition(
            wndMgr.GetScreenWidth() / 2 - showingImage.GetWidth() / 2,
            wndMgr.GetScreenHeight() / 8 - showingImage.GetHeight() / 2)
        showingImage.Show()
        self.image = showingImage
        showingImageName = ui.ImageBox()
        showingImageName.SetParent(self.bgWindow)
        showingImageName.SetPosition(
            showingImage.GetLeft(),
            showingImage.GetTop() + showingImage.GetHeight() + 3)
        showingImageName.Show()
        self.imageName = showingImageName

        self.indexLeft = []
Ejemplo n.º 12
0
	def OnTitleImage(self, filename):
		img = ui.ImageBox("TOP_MOST")

		try:
			img.SetWindowHorizontalAlignCenter()
			img.LoadImage(filename)
			img.SetPosition(0, wndMgr.GetScreenHeight() - (75/2) - (32/2))
			img.SetAlpha(0.0)
			img.Show()
		except RuntimeError:
			dbg.TraceError("QuestDialog.OnTitleImage(%s)" % filename)
			img.Hide()

		self.imgTitle = img
		self.titleState = self.TITLE_STATE_APPEAR
		self.titleShowTime = app.GetTime()
Ejemplo n.º 13
0
    def __init__(self, layer="UI"):
        ui.Window.__init__(self, layer)

        self.width = 0
        self.height = 0
        self.imageList = []
        self.buttonList = []
        self.Selected = -1
        self.old_time = app.GetTime()
        self.delay = 10.0

        image = ui.ImageBox()
        image.SetParent(self)
        image.SetPosition(0, 0)
        image.Hide()
        self.Image = image
Ejemplo n.º 14
0
    def __CreateImageBox(self, fileName):
        (self.canLoad, self.imgWidth,
         self.imgHeight) = app.GetImageInfo(fileName)

        if 1 == self.canLoad:
            if 16 == self.imgWidth and 12 == self.imgHeight:
                imgBox = ui.ImageBox()
                imgBox.AddFlag("not_pick")
                imgBox.SetParent(self)
                imgBox.SetPosition(0, 2)
                imgBox.LoadImage(fileName)
                imgBox.Show()
                return imgBox
            else:
                return 0
        else:
            return 0
Ejemplo n.º 15
0
    def saveAccountChenars(self):
        self.chenar = {}
        self.keys = {}
        self.deleteButton = {}
        self.saveButton = {}
        tab = 0
        chenars =[
        [[5,10,120,20,145,20]],
        [[5,48,120,58,145,58]],
        [[5,87,120,58+38,145,58+38]],
        [[5,125,120,58+38*2,145,58+38*2]]]

        for a in chenars:
            self.keys[tab] = ui.ImageBox()
            self.keys[tab].SetParent(self.accountSaveBoardSave)
            self.keys[tab].SetPosition(a[0][0],a[0][1])
            self.keys[tab].LoadImage("d:/ymir work/ui/intro/login/f/f%s.tga" % (tab))
            self.keys[tab].Show()

            ###Buttons
            self.saveButton[tab] = ui.Button()
            self.saveButton[tab].SetParent(self.accountSaveBoardSave)
            self.saveButton[tab].SetPosition(a[0][4],a[0][5])
            self.saveButton[tab].SetUpVisual("d:/ymir work/ui/intro/login/save/save_normal.tga")
            self.saveButton[tab].SetOverVisual("d:/ymir work/ui/intro/login/save/save_hover.tga")
            self.saveButton[tab].SetDownVisual("d:/ymir work/ui/intro/login/save/save_hover.tga")
            self.saveButton[tab].Show()

            self.deleteButton[tab] = ui.Button()
            self.deleteButton[tab].SetParent(self.accountSaveBoardSave)
            self.deleteButton[tab].SetPosition(a[0][2],a[0][3])
            self.deleteButton[tab].SetUpVisual("d:/ymir work/ui/intro/login/delete/delete_normal.tga")
            self.deleteButton[tab].SetOverVisual("d:/ymir work/ui/intro/login/delete/delete_hover.tga")
            self.deleteButton[tab].SetDownVisual("d:/ymir work/ui/intro/login/delete/delete_hover.tga")
            self.deleteButton[tab].Show()

            for (tab, saveButton) in self.saveButton.items():
                saveButton.SetEvent(ui.__mem_func__(self.saveAccountFunction),tab)

            for (tab, deleteButton) in self.deleteButton.items():
                deleteButton.SetEvent(ui.__mem_func__(self.deleteAccountFunction),tab)

            tab +=1
Ejemplo n.º 16
0
    def __init__(self, getParentEvent):
        ui.Window.__init__(self)

        self.SetParent(getParentEvent())
        self.AddFlag("float")

        self.name = ""
        self.image = ui.ImageBox()
        self.image.AddFlag("not_pick")
        self.image.SetParent(self)
        self.image.Show()
        self.text = ui.TextLine()
        self.text.SetParent(self)
        self.text.SetPosition(20, 2)
        self.text.Show()

        self.lovePoint = -1
        self.lovePointToolTip = None

        self.isSelected = False

        self.getParentEvent = getParentEvent
	def SetCharacterCount(self, xCount, yCount):
		self.SetSize(xCount*14 + 14, yCount*14 + 7)
		self.BaseBar.SetSize(xCount*14 + 1, yCount*14 + 1)

		self.numberList = []
		self.slotList = []

		for y in xrange(yCount):

			number = ui.ImageBox()
			number.SetParent(self.BaseBar)
			number.LoadImage("d:/ymir work/ui/pattern/ime/%d.tga" % (y+1))
			number.SetPosition(5 - 10, 8 + y * 14 - 3)
			number.Show()
			self.numberList.append(number)

			slot = ui.Bar()
			slot.SetParent(self.BaseBar)
			slot.SetPosition(10 + 1 - 10, 3 + y*14 + 1 - 3)
			slot.SetSize(xCount*14 - 1, 13)
			slot.SetColor(0xFF302C2A)
			slot.Show()
			self.slotList.append(slot)
Ejemplo n.º 18
0
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()

			if constInfo.IN_GAME_SHOP_ENABLE:
				pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "TaskBar.py")
			else:
				pyScrLoader.LoadScriptFile(self, "UIScript/TaskBar.py")
			pyScrLoader.LoadScriptFile(self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT], "UIScript/MouseButtonWindow.py")
			pyScrLoader.LoadScriptFile(self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT], "UIScript/RightMouseButtonWindow.py")
		except:
			import exception
			exception.Abort("TaskBar.LoadWindow.LoadObject")

		self.quickslot = []
		self.quickslot.append(self.GetChild("quick_slot_1"))
		self.quickslot.append(self.GetChild("quick_slot_2"))
		for slot in self.quickslot:
			slot.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
			slot.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptyQuickSlot))
			slot.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemQuickSlot))
			slot.SetUnselectItemSlotEvent(ui.__mem_func__(self.UnselectItemQuickSlot))
			slot.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
			slot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

		toggleButtonDict = {}
		toggleButtonDict[TaskBar.BUTTON_CHARACTER]=self.GetChild("CharacterButton")
		toggleButtonDict[TaskBar.BUTTON_INVENTORY]=self.GetChild("InventoryButton")
		toggleButtonDict[TaskBar.BUTTON_MESSENGER]=self.GetChild("MessengerButton")
		toggleButtonDict[TaskBar.BUTTON_SYSTEM]=self.GetChild("SystemButton")
		# toggleButtonDict[TaskBar.BUTTON_INV]=self.GetChild("InvButton")
		toggleButtonDict[TaskBar.BUTTON_EXPAND_MONEY]=self.GetChild("ExpandMoneyButton")

		# ChatButton, ExpandButton 둘 중 하나는 반드시 존재한다.
		try:
			toggleButtonDict[TaskBar.BUTTON_CHAT]=self.GetChild("ChatButton")
		except:
			toggleButtonDict[TaskBar.BUTTON_EXPAND]=self.GetChild("ExpandButton")
			TaskBar.IS_EXPANDED = True


		if localeInfo.IsARABIC():
			systemButton = toggleButtonDict[TaskBar.BUTTON_SYSTEM]
			if systemButton.ToolTipText:
				tx, ty = systemButton.ToolTipText.GetLocalPosition()
				tw = systemButton.ToolTipText.GetWidth()
				systemButton.ToolTipText.SetPosition(-tw/2, ty)


		expGauge = []
		expGauge.append(self.GetChild("EXPGauge_01"))
		expGauge.append(self.GetChild("EXPGauge_02"))
		expGauge.append(self.GetChild("EXPGauge_03"))
		expGauge.append(self.GetChild("EXPGauge_04"))

		for exp in expGauge:
			exp.SetSize(0, 0)


		self.quickPageNumImageBox=self.GetChild("QuickPageNumber")

		self.GetChild("QuickPageUpButton").SetEvent(ui.__mem_func__(self.__OnClickQuickPageUpButton))
		self.GetChild("QuickPageDownButton").SetEvent(ui.__mem_func__(self.__OnClickQuickPageDownButton))

		mouseLeftButtonModeButton = self.GetChild("LeftMouseButton")
		mouseRightButtonModeButton = self.GetChild("RightMouseButton")
		mouseLeftButtonModeButton.SetEvent(ui.__mem_func__(self.ToggleLeftMouseButtonModeWindow))
		mouseRightButtonModeButton.SetEvent(ui.__mem_func__(self.ToggleRightMouseButtonModeWindow))
		self.curMouseModeButton = [ mouseLeftButtonModeButton, mouseRightButtonModeButton ]

		(xLocalRight, yLocalRight) = mouseRightButtonModeButton.GetLocalPosition()
		self.curSkillButton = self.SkillButton()
		self.curSkillButton.SetParent(self)
		self.curSkillButton.SetPosition(xLocalRight, 3)
		self.curSkillButton.SetSkillEvent(ui.__mem_func__(self.ToggleRightMouseButtonModeWindow))
		self.curSkillButton.Hide()

		(xLeft, yLeft) = mouseLeftButtonModeButton.GetGlobalPosition()
		(xRight, yRight) = mouseRightButtonModeButton.GetGlobalPosition()
		leftModeButtonList = self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT]
		leftModeButtonList.SetPosition(xLeft, yLeft - leftModeButtonList.GetHeight()-5)
		rightModeButtonList = self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT]
		rightModeButtonList.SetPosition(xRight - rightModeButtonList.GetWidth() + 32, yRight - rightModeButtonList.GetHeight()-5)
		rightModeButtonList.GetChild("button_skill").SetEvent(lambda adir=self.MOUSE_BUTTON_RIGHT, aevent=self.EVENT_SKILL: self.SelectMouseButtonEvent(adir, aevent))
		rightModeButtonList.GetChild("button_skill").Hide()

		mouseImage = ui.ImageBox("TOP_MOST")
		mouseImage.AddFlag("float")
		mouseImage.LoadImage("d:/ymir work/ui/game/taskbar/mouse_button_camera_01.sub")
		mouseImage.SetPosition(xRight, wndMgr.GetScreenHeight() - 34)
		mouseImage.Hide()
		self.mouseImage = mouseImage

		dir = self.MOUSE_BUTTON_LEFT
		wnd = self.mouseModeButtonList[dir]
		wnd.GetChild("button_move_and_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_MOVE_AND_ATTACK: self.SelectMouseButtonEvent(adir, aevent))
		wnd.GetChild("button_auto_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_AUTO: self.SelectMouseButtonEvent(adir, aevent))
		wnd.GetChild("button_camera").SetEvent(lambda adir=dir, aevent=self.EVENT_CAMERA: self.SelectMouseButtonEvent(adir, aevent))

		dir = self.MOUSE_BUTTON_RIGHT
		wnd = self.mouseModeButtonList[dir]
		wnd.GetChild("button_move_and_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_MOVE_AND_ATTACK: self.SelectMouseButtonEvent(adir, aevent))
		wnd.GetChild("button_camera").SetEvent(lambda adir=dir, aevent=self.EVENT_CAMERA: self.SelectMouseButtonEvent(adir, aevent))

		self.toggleButtonDict = toggleButtonDict
		self.expGauge = expGauge

		if constInfo.IN_GAME_SHOP_ENABLE:
			self.rampageGauge1  = self.GetChild("RampageGauge")
			self.rampageGauge1.OnMouseOverIn = ui.__mem_func__(self.__RampageGauge_OverIn)
			self.rampageGauge2 = self.GetChild("RampageGauge2")
			self.rampageGauge2.OnMouseOverOut = ui.__mem_func__(self.__RampageGauge_OverOut)
			self.rampageGauge2.OnMouseLeftButtonUp = ui.__mem_func__(self.__RampageGauge_Click)
			print "[DEBUG]: constInfo.IN_GAME_SHOP_ENABLE / self.rampageGauge1",constInfo.IN_GAME_SHOP_ENABLE, self.rampageGauge1
			self.__RampageGauge_OverOut()

		self.hpGauge = self.GetChild("HPGauge")
		self.mpGauge = self.GetChild("SPGauge")
		self.stGauge = self.GetChild("STGauge")
		self.hpRecoveryGaugeBar = self.GetChild("HPRecoveryGaugeBar")
		self.spRecoveryGaugeBar = self.GetChild("SPRecoveryGaugeBar")

		self.hpGaugeBoard=self.GetChild("HPGauge_Board")
		self.mpGaugeBoard=self.GetChild("SPGauge_Board")
		self.stGaugeBoard=self.GetChild("STGauge_Board")
		self.expGaugeBoard=self.GetChild("EXP_Gauge_Board")

		#giftbox object
		wndGiftBox = GiftBox()
		wndGiftBox.LoadWindow()
		self.wndGiftBox = wndGiftBox

		self.__LoadMouseSettings()
		self.RefreshStatus()
		self.RefreshQuickSlot()
Ejemplo n.º 19
0
    def __init__(self):
        ui.Window.__init__(self)
        self.AddFlag("float")

        self.SetWindowName("ChatWindow")
        self.__RegisterChatColorDict()

        self.boardState = chat.BOARD_STATE_VIEW
        self.chatID = chat.CreateChatSet(chat.CHAT_SET_CHAT_WINDOW)
        chat.SetBoardState(self.chatID, chat.BOARD_STATE_VIEW)

        self.xBar = 0
        self.yBar = 0
        self.widthBar = 0
        self.heightBar = 0
        self.curHeightBar = 0
        self.visibleLineCount = 0
        self.scrollBarPos = 1.0
        self.scrollLock = False

        chatInputSet = ChatInputSet()
        chatInputSet.SetParent(self)
        chatInputSet.SetEscapeEvent(ui.__mem_func__(self.CloseChat))
        chatInputSet.SetReturnEvent(ui.__mem_func__(self.CloseChat))
        chatInputSet.SetSize(550, 25)
        self.chatInputSet = chatInputSet

        btnSendWhisper = ui.Button()
        btnSendWhisper.SetParent(self)
        btnSendWhisper.SetUpVisual(
            "d:/ymir work/ui/game/taskbar/Send_Whisper_Button_01.sub")
        btnSendWhisper.SetOverVisual(
            "d:/ymir work/ui/game/taskbar/Send_Whisper_Button_02.sub")
        btnSendWhisper.SetDownVisual(
            "d:/ymir work/ui/game/taskbar/Send_Whisper_Button_03.sub")
        btnSendWhisper.SetToolTipText(localeInfo.CHAT_SEND_MEMO)
        btnSendWhisper.Hide()
        self.btnSendWhisper = btnSendWhisper

        import uilanguagesystem
        wndFilterChat = uilanguagesystem.ChatFilterWindow()
        wndFilterChat.AddFlag("float")
        wndFilterChat.Hide()
        self.wndFilterChat = wndFilterChat

        btnFilterChat = ui.Button()
        btnFilterChat.SetParent(self)
        btnFilterChat.SetUpVisual(
            "d:/ymir work/ui/game/taskbar/ignore_button_01.sub")
        btnFilterChat.SetOverVisual(
            "d:/ymir work/ui/game/taskbar/ignore_button_02.sub")
        btnFilterChat.SetDownVisual(
            "d:/ymir work/ui/game/taskbar/ignore_button_03.sub")
        btnFilterChat.SetToolTipText(localeInfo.CHAT_FILTER)
        btnFilterChat.SAFE_SetEvent(self.ToggleFilterChatWindow)
        btnFilterChat.Hide()
        self.btnFilterChat = btnFilterChat

        btnChatLog = ui.Button()
        btnChatLog.SetParent(self)
        btnChatLog.SetUpVisual(
            "d:/ymir work/ui/game/taskbar/Open_Chat_Log_Button_01.sub")
        btnChatLog.SetOverVisual(
            "d:/ymir work/ui/game/taskbar/Open_Chat_Log_Button_02.sub")
        btnChatLog.SetDownVisual(
            "d:/ymir work/ui/game/taskbar/Open_Chat_Log_Button_03.sub")
        btnChatLog.SetToolTipText(localeInfo.CHAT_LOG)
        btnChatLog.Hide()
        self.btnChatLog = btnChatLog

        btnChatSizing = self.ChatButton()
        btnChatSizing.SetOwner(self)
        btnChatSizing.SetMoveEvent(ui.__mem_func__(self.Refresh))
        btnChatSizing.Hide()
        self.btnChatSizing = btnChatSizing

        imgChatBarLeft = ui.ImageBox()
        imgChatBarLeft.SetParent(self.btnChatSizing)
        imgChatBarLeft.AddFlag("not_pick")
        imgChatBarLeft.LoadImage("d:/ymir work/ui/pattern/chat_bar_left.tga")
        imgChatBarLeft.Show()
        self.imgChatBarLeft = imgChatBarLeft
        imgChatBarRight = ui.ImageBox()
        imgChatBarRight.SetParent(self.btnChatSizing)
        imgChatBarRight.AddFlag("not_pick")
        imgChatBarRight.LoadImage("d:/ymir work/ui/pattern/chat_bar_right.tga")
        imgChatBarRight.Show()
        self.imgChatBarRight = imgChatBarRight
        imgChatBarMiddle = ui.ExpandedImageBox()
        imgChatBarMiddle.SetParent(self.btnChatSizing)
        imgChatBarMiddle.AddFlag("not_pick")
        imgChatBarMiddle.LoadImage(
            "d:/ymir work/ui/pattern/chat_bar_middle.tga")
        imgChatBarMiddle.Show()
        self.imgChatBarMiddle = imgChatBarMiddle

        scrollBar = ui.ScrollBar()
        scrollBar.AddFlag("float")
        scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
        self.scrollBar = scrollBar

        self.Refresh()
        self.chatInputSet.RefreshPosition()  # RTL 시 위치를 제대로 잡으려면 위치 갱신이 필요하다
Ejemplo n.º 20
0
    def __CreateWindow(self):
        imgLeft = ui.ImageBox()
        imgLeft.AddFlag("not_pick")
        imgLeft.SetParent(self)

        imgCenter = ui.ExpandedImageBox()
        imgCenter.AddFlag("not_pick")
        imgCenter.SetParent(self)

        imgRight = ui.ImageBox()
        imgRight.AddFlag("not_pick")
        imgRight.SetParent(self)

        if localeInfo.IsARABIC():
            imgLeft.LoadImage("locale/ae/ui/pattern/titlebar_left.tga")
            imgCenter.LoadImage("locale/ae/ui/pattern/titlebar_center.tga")
            imgRight.LoadImage("locale/ae/ui/pattern/titlebar_right.tga")
        else:
            imgLeft.LoadImage(
                "d:/ymir work/ui/pattern/chatlogwindow_titlebar_left.tga")
            imgCenter.LoadImage(
                "d:/ymir work/ui/pattern/chatlogwindow_titlebar_middle.tga")
            imgRight.LoadImage(
                "d:/ymir work/ui/pattern/chatlogwindow_titlebar_right.tga")

        imgLeft.Show()
        imgCenter.Show()
        imgRight.Show()

        btnClose = ui.Button()
        btnClose.SetParent(self)
        btnClose.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
        btnClose.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
        btnClose.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
        btnClose.SetToolTipText(localeInfo.UI_CLOSE, 0, -23)
        btnClose.SetEvent(ui.__mem_func__(self.Close))
        btnClose.Show()

        btnSizing = self.ResizeButton()
        btnSizing.SetParent(self)
        btnSizing.SetMoveEvent(ui.__mem_func__(self.OnResize))
        btnSizing.SetSize(16, 16)
        btnSizing.Show()

        titleName = ui.TextLine()
        titleName.SetParent(self)

        if localeInfo.IsARABIC():
            titleName.SetPosition(self.GetWidth() - 20, 6)
        else:
            titleName.SetPosition(20, 6)

        titleName.SetText(localeInfo.CHAT_LOG_TITLE)
        titleName.Show()

        self.imgLeft = imgLeft
        self.imgCenter = imgCenter
        self.imgRight = imgRight
        self.btnClose = btnClose
        self.btnSizing = btnSizing
        self.titleName = titleName
Ejemplo n.º 21
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.º 22
0
    def __init__(self):
        ui.BoardWithTitleBar.__init__(self)
        self.SetSize(350, 350)
        self.SetCenterPosition()
        self.SetTitleName("Daily-Quest")
        self.AddFlag("movable")
        self.AddFlag("float")
        self.Hide()

        self.Index = 0
        self.AddQuestHeight = 1

        self.OverLines = []
        for i in [["Auftrag:", 45], ["Zeit bis zur nächsten Daily:", 80],
                  ["Belohnung:", 130], ["Auftrag starten:", 255]]:
            b = ui.HorizontalBar()
            b.SetParent(self)
            b.SetPosition(12, i[1] + (i[1] > 45 and self.AddQuestHeight * 15))
            b.pos = i[1]
            b.Create(326)
            b.Show()
            b.line = ui.TextLine()
            b.line.SetParent(b)
            b.line.SetPosition(326 / 2, 1)
            b.line.SetHorizontalAlignCenter()
            b.line.SetText(i[0])
            b.line.Show()
            self.OverLines.append(b)

        self.MobInfoLines = []
        for i in xrange(10):
            l = ui.TextLine()
            l.SetParent(self)
            if i in [1, 3, 5, 7, 9]:
                l.SetPosition(336, 70 + (i - 1) / 2 * 15)
            else:
                l.SetPosition(14, 70 + i / 2 * 15)
            if i in [1, 3, 5, 7, 9]:
                l.SetHorizontalAlignRight()
            # l.SetText("Töte 10 Wildhunde")
            l.Hide()
            self.MobInfoLines.append(l)

        self.TimeLeft = ui.TextLine()
        self.TimeLeft.SetParent(self)
        self.TimeLeft.SetPosition(14, self.AddQuestHeight * 15 + 105)
        self.TimeLeft.SetText("Du kannst wieder einen Auftrag starten.")
        self.TimeLeft.Time = 0
        self.TimeLeft.Show()

        self.qLimit = ui.Button()
        self.qLimit.SetParent(self)
        self.qLimit.SetPosition(50, 280 + self.AddQuestHeight * 15)
        self.qLimit.SetUpVisual(
            "d:/ymir work/ui/game/windows/tab_button_large_03.sub")
        self.qLimit.SetOverVisual(
            "d:/ymir work/ui/game/windows/tab_button_large_03.sub")
        self.qLimit.SetDownVisual(
            "d:/ymir work/ui/game/windows/tab_button_large_03.sub")
        self.qLimit.limit = 2
        self.qLimit.limitTable = [[
            "Lv. 1 bis Lv. 84", "Lv. 85 bis Lv. 134", "Lv. 135"
        ], ["Leicht", "Mittel", "Schwer"]]
        # self.qLimit.SetEvent(ui.__mem_func__(self.ChangeLimit))
        self.qLimit.Show()

        self.qStart = ui.RadioButton()
        self.qStart.SetParent(self)
        self.qStart.SetPosition(220, 280 + self.AddQuestHeight * 15)
        self.qStart.SetUpVisual(
            "d:/ymir work/ui/game/windows/tab_button_large_01.sub")
        self.qStart.SetOverVisual(
            "d:/ymir work/ui/game/windows/tab_button_large_02.sub")
        self.qStart.SetDownVisual(
            "d:/ymir work/ui/game/windows/tab_button_large_03.sub")
        self.qStart.SetText("Auftrag starten")
        self.qStart.SetEvent(ui.__mem_func__(self.StartQuest))
        self.qStart.Show()
        self.qStart.Down()

        self.ThinWinText = ui.ThinBoard()
        self.ThinWinText.SetParent(self)
        self.ThinWinText.SetPosition(12, 155 + self.AddQuestHeight * 15)
        self.ThinWinText.SetSize(165, 90)
        self.ThinWinText.Show()

        self.InfoLines = []
        for i in xrange(7):
            l = ui.TextLine()
            if i < 5:
                l.SetParent(self.ThinWinText)
                l.SetPosition(165 / 2, 7 + i * 15)
            else:
                l.SetParent(self)
                l.SetPosition(262,
                              165 + self.AddQuestHeight * 15 + 45 * (i - 5))
            l.SetHorizontalAlignCenter()
            l.SetText([
                "Nach abschließen", "dieser Quest", "erhälst du",
                "folgend gelistete", "Items:", "Daily-Kiste", "1 Dailypoint(s)"
            ][i])
            l.Show()
            self.InfoLines.append(l)

        #self.ItemImage = ui.ImageBox()
        #self.ItemImage.SetParent(self)
        #self.ItemImage.SetPosition(262-16,185+self.AddQuestHeight*15)
        #self.ItemImage.LoadImage("icon/item/daily.tga")
        #self.ItemImage.Show()

        self.ItemImage2 = ui.ImageBox()
        self.ItemImage2.SetParent(self)
        self.ItemImage2.SetPosition(262 - 16,
                                    185 + self.AddQuestHeight * 15 + 45)
        self.ItemImage2.LoadImage("icon/sidebar/daily.tga")
        self.ItemImage2.Show()

        self.ChangeLimit()

        self.SetSize(350, 320 + self.AddQuestHeight * 15)
Ejemplo n.º 23
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.º 24
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.º 25
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.º 26
0
 def AppendSeperator(self):
     img = ui.ImageBox()
     img.LoadImage("d:/ymir work/ui/seperator.tga")
     self.AppendWindow(img)
     img.SetPosition(img.GetLeft(), img.GetTop() - 15)
     self.yPos -= 15
Ejemplo n.º 27
0
 def __MakeSlot(self):
     slot = ui.ImageBox()
     slot.LoadImage("d:/ymir work/ui/public/slot_base.sub")
     slot.Show()
     self.children.append(slot)
     return slot
    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.º 29
0
 def __MakeItemImage(self):
     itemImage = ui.ImageBox()
     itemImage.Show()
     self.children.append(itemImage)
     return itemImage
Ejemplo n.º 30
0
    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.HeadIMGThinBoard = ui.ThinBoard()
        self.HeadIMGThinBoard.SetParent(self)
        self.HeadIMGThinBoard.SetPosition((wndMgr.GetScreenWidth() / 2) - 150,
                                          (wndMgr.GetScreenHeight() / 2) - 180)
        self.HeadIMGThinBoard.SetSize(300, 80)
        self.HeadIMGThinBoard.Show()

        self.CloseButton = ui.Button()
        self.CloseButton.SetParent(self)
        self.CloseButton.SetPosition((wndMgr.GetScreenWidth() / 2) + 104,
                                     (wndMgr.GetScreenHeight() / 2) - 200)
        self.CloseButton.SetText("")
        self.CloseButton.SetUpVisual(
            "images_dungeon\src_illumina\close_button_01.tga")
        self.CloseButton.SetOverVisual(
            "images_dungeon\src_illumina\close_button_02.tga")
        self.CloseButton.SetDownVisual(
            "images_dungeon\src_illumina\close_button_03.tga")
        self.CloseButton.SetEvent(self.Open)
        self.CloseButton.Show()

        self.StoryTextThinBoard = ui.ThinBoard()
        self.StoryTextThinBoard.SetParent(self)
        self.StoryTextThinBoard.SetPosition(
            (wndMgr.GetScreenWidth() / 2) - 150,
            (wndMgr.GetScreenHeight() / 2) - 95)
        self.StoryTextThinBoard.SetSize(300, 400)
        self.StoryTextThinBoard.Show()

        self.HeadLineCenterImage = ui.ImageBox()
        self.HeadLineCenterImage.SetParent(self.StoryTextThinBoard)
        self.HeadLineCenterImage.SetPosition(150 - 104, 18)
        self.HeadLineCenterImage.LoadImage(
            "images_dungeon\src_illumina\center.tga")
        self.HeadLineCenterImage.Show()

        self.DungeonNameTextLine = ui.TextLine()
        self.DungeonNameTextLine.SetParent(self.StoryTextThinBoard)
        self.DungeonNameTextLine.SetPosition(150, 15)
        self.DungeonNameTextLine.SetHorizontalAlignCenter()
        self.DungeonNameTextLine.SetText("Dungeon-Name")
        self.DungeonNameTextLine.Show()

        i = 0
        x = 8

        self.Show()