Пример #1
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
Пример #2
0
	def OnTopImage(self, imgfile):
		imgfile = self.__GetQuestImageFileName(imgfile)

		bd = self.board
		bx, by = bd.GetLocalPosition()
		if not self.imgTop:
			self.imgTop = ui.ExpandedImageBox("TOP_MOST")
			self.imgTop.SetParent(self)
			bd.SetPosition(bx,190)
			self.imgTop.SetPosition(bx,10)

		try:
			self.imgTop.LoadImage(imgfile)
			h = self.imgTop.GetHeight()
			if h>170:
				# need adjust board size
				bd.SetPosition(bx,20+h)
				bd.SetSize(350,420-h)
				self.imgTop.SetSize(350,h)
			else:
				self.imgTop.SetSize(350,170)
				bd.SetPosition(bx,190)
				bd.SetSize(350,250)
			self.imgTop.SetOrigin(self.imgTop.GetWidth()/2,self.imgTop.GetHeight()/2)
			self.imgTop.Show()
		except RuntimeError:
			dbg.TraceError("QuestDialog.OnTopImage(%s)" % imgfile)
			self.imgTop.Hide()
Пример #3
0
 def ExpandedImage(self, parent, x, y, img):
     image = ui.ExpandedImageBox()
     if parent != None:
         image.SetParent(parent)
     image.SetPosition(x, y)
     image.LoadImage(img)
     image.Show()
     return image
Пример #4
0
    def LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/bosstracking.py")
        except:
            import exception
            exception.Abort("BossTrackingSystemWindow.LoadWindow.LoadObject")
        try:
            self.titleBar = self.GetChild("titlebar")
            self.board = self.GetChild("board")
            self.title_name = self.GetChild("title_name")
            self.title_name_2 = self.GetChild("title_name_2")
            self.title_name_3 = self.GetChild("title_name_3")
            self.title_name_4 = self.GetChild("title_name_4")
            self.title_name_5 = self.GetChild("title_name_5")

            self.Channel1Time = self.GetChild("CH1Time")
            self.Channel2Time = self.GetChild("CH2Time")
            self.Channel3Time = self.GetChild("CH3Time")
            self.Channel4Time = self.GetChild("CH4Time")
            self.Channel5Time = self.GetChild("CH5Time")
            self.Channel6Time = self.GetChild("CH6Time")
            self.GetChild("btnMenuCadi").SAFE_SetEvent(self.__MenuFunction, 1)
            self.GetChild("btnMenuAlevKral").SAFE_SetEvent(
                self.__MenuFunction, 2)
            self.GetChild("btnMenuKOrumcek").SAFE_SetEvent(
                self.__MenuFunction, 3)
            self.GetChild("btnMenuKEjder").SAFE_SetEvent(
                self.__MenuFunction, 4)
            self.GetChild("btnMenuDokuzKuyruk").SAFE_SetEvent(
                self.__MenuFunction, 5)
            self.GetChild("btnMenuGeneral").SAFE_SetEvent(
                self.__MenuFunction, 6)
            self.GetChild("btnMenuOrumcekBarones").SAFE_SetEvent(
                self.__MenuFunction, 7)
            self.GetChild("btnMenuHayaletAgac").SAFE_SetEvent(
                self.__MenuFunction, 8)
            self.GetChild("btnMenuKomutan").SAFE_SetEvent(
                self.__MenuFunction, 9)
            self.GetChild("btnMenuKaranlikLider").SAFE_SetEvent(
                self.__MenuFunction, 10)
        except:
            import exception
            exception.Abort("BossTrackingSystemWindow.LoadWindow.BindObject")

        self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))

        self.title_name.SetText("Güçlü Buz Cadýsý")
        self.title_name_2.SetText("Seviye : 89")
        self.title_name_3.SetText("Bölge : Sürgün Maðarasý")
        self.title_name_4.SetText("Etkili Týlsým : Buz Týlsýmý")
        self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 4saat")
        self.BossTrackingImage = ui.ExpandedImageBox()
        self.BossTrackingImage.SetParent(self.board)
        self.BossTrackingImage.LoadImage("d:/ymir work/patrontakip/slot_1.tga")
        self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
        self.BossTrackingImage.Show()
        constInfo.bosstracking = 1
Пример #5
0
 def ExpandedImage(self, parent, x, y, img, tooltip=None):
     image = ui.ExpandedImageBox()
     if parent != None:
         image.SetParent(parent)
     image.SetPosition(x, y)
     image.LoadImage(img)
     image.Show()
     #image.SetToolTipText(tooltip)
     return image
Пример #6
0
 def CreateImage(self, parent, x, y, path=None, not_pick=TRUE):
     image = ui.ExpandedImageBox()
     image.SetParent(parent)
     if not_pick:
         image.AddFlag("not_pick")
     image.SetPosition(x, y)
     if path != None:
         image.LoadImage(path)
     image.Show()
     return image
Пример #7
0
	def ExpandedImageBox(self, parent, image, x, y, min, max):
		tmpExpImageBox = ui.ExpandedImageBox()
		
		if parent:
			tmpExpImageBox.SetParent(parent)
		
		tmpExpImageBox.LoadImage(image)
		
		tmpExpImageBox.SetPosition(x,y)
		tmpExpImageBox.SetPercentage(min,max)
		
		tmpExpImageBox.Show()
		return tmpExpImageBox
Пример #8
0
                def __init__(self, width):
                    ui.ListBoxExNew.Item.__init__(self)

                    image = ui.ExpandedImageBox()
                    image.SetParent(self)
                    image.Show()
                    self.image = image

                    nameLine = ui.TextLine()
                    nameLine.SetParent(self)
                    nameLine.SetPosition(32 + 5, 0)
                    nameLine.Show()
                    self.nameLine = nameLine

                    self.SetSize(width, 32 + 5)
Пример #9
0
	def OnBackgroundImage(self, imgfile):
		imgfile = self.__GetQuestImageFileName(imgfile)
		c = self.board
		w = c.GetWidth()
		h = c.GetHeight()
		px, py = c.GetLocalPosition()
		moved = 0
		if not self.imgBackground:
			self.imgBackground = ui.ExpandedImageBox("TOP_MOST")
			self.imgBackground.SetParent(c)
			self.imgBackground.SetPosition(0,0)
		self.imgBackground.LoadImage(imgfile)
		iw = self.imgBackground.GetWidth()
		ih = self.imgBackground.GetHeight()
		if self.skin==3:
			iw = 256
			ih = 333
			self.imgBackground.SetSize(iw,ih)
		if w < iw:
			px -= (iw-w)/2
			c.SetPosition(px,py)
			w = iw
		if h < ih:
			py -= (ih-h)/2
			c.SetPosition(px,py)
			h = ih
		if self.skin == 3:
			w=256
			h = 333
			self.sx = 0
			self.sy = 100

		c.SetSize(w,h)
		c.HideInternal()

		c.SetWindowHorizontalAlignCenter()
		c.SetWindowVerticalAlignCenter()

		c.SetPosition(0,0)
		if self.skin==3:
			c.SetPosition(-190,0)

		self.imgBackground.SetWindowHorizontalAlignCenter()
		self.imgBackground.SetWindowVerticalAlignCenter()
		self.imgBackground.SetPosition(0,0)
		self.imgBackground.Show()
Пример #10
0
				def __init__(self, width):
					ui.ListBoxExNew.Item.__init__(self)

					image = ui.ExpandedImageBox()
					image.SetParent(self)
					image.Show()
					self.image = image

					nameLine = ui.TextLine()
					nameLine.SetParent(self)
					nameLine.SetPosition(32 + 5, 0)
					nameLine.Show()
					self.nameLine = nameLine

					if app.ENABLE_SEND_TARGET_INFO_EXTENDED:
						rarity = ui.TextLine()
						rarity.SetParent(self)
						rarity.SetPosition(32 + 5, 11)
						rarity.Show()
						self.rarity = rarity

					self.SetSize(width, 32 + 5)
Пример #11
0
	def OnLeftImage(self, imgfile):
		imgfile = self.__GetQuestImageFileName(imgfile)
		if not self.imgLeft:
			self.imgLeft = ui.ExpandedImageBox("TOP_MOST")
			self.imgLeft.SetParent(self)
			self.imgLeft.SetPosition(0,0)
			bd = self.board
			bx, by = bd.GetLocalPosition()
			bd.SetPosition(160,by)
			if self.imgTop:
				tx, ty = self.imgTop.GetLocalPosition()
				self.imgTop.SetPosition(160,ty)

		try:
			self.imgLeft.LoadImage(imgfile)
			self.imgLeft.SetSize(400,450)
			self.imgLeft.SetOrigin(self.imgLeft.GetWidth()/2,self.imgLeft.GetHeight()/2)
			self.imgLeft.Show()
		except RuntimeError:
			import dbg
			dbg.TraceError("QuestDialog.OnLeftImage(%s)" % imgfile)
			self.imgLeft.Hide()
Пример #12
0
	def ShowMapName(self, mapName, x, y):
		if not self.MAP_NAME_IMAGE.has_key(mapName):
			print " [ERROR] - There is no map name image", mapName
			return

		try:
			self.LoadImage(self.MAP_NAME_IMAGE[mapName])
		except RuntimeError:
			return

		self.__Initialize()

		if mapName == "metin2_map_deviltower1":
			self.SetPosition(-60, 80)

			self.floorImage = ui.ExpandedImageBox()
			self.floorImage.AddFlag("not_pick")
			self.floorImage.SetWindowHorizontalAlignCenter()
			self.floorImage.SetPosition(100, 80)
			self.floorImage.SetAlpha(0.0)
			self.floorImage.Show()
			# 맵이름 (ex: 아귀동굴) 이미지 로딩 & 표시			
			try:
				floor = self.__GetDevilTowerFloor(x, y)
				print x, y, floor
				self.floorImage.LoadImage(LOCALE_PATH+"devil1_%df.tga" % floor)
			except RuntimeError:
				self.SetPosition(0, 80)
				self.floorImage.Hide()
				self.floorImage = None
							
			if locale.IsYMIR() or locale.IsWE_KOREA():	
				self.objectiveImage = ui.ExpandedImageBox()
				self.objectiveImage.AddFlag("not_pick")
				self.objectiveImage.SetWindowHorizontalAlignCenter()
				self.objectiveImage.SetPosition(0, 200)
				self.objectiveImage.SetAlpha(0.0)
				self.objectiveImage.Show()
			
				# 층별 목표 이미지 로딩 & 표시
				# 던전은 현재 몇층인지 알아오는 부분 때문에 하드코딩을 피하기가 힘들다...
				try:
					floor = self.__GetDevilTowerFloor(x, y)
					print x, y, floor
					self.objectiveImage.LoadImage(LOCALE_PATH + mapName + "/obj_%02df.tga" % floor)
				except RuntimeError:
					self.SetPosition(0, 80)
					self.objectiveImage.Hide()
					self.objectiveImage = None
				
		if mapName == "metin2_map_devilsCatacomb":
			self.SetPosition(-75, 80)

			self.floorImage = ui.ExpandedImageBox()
			self.floorImage.AddFlag("not_pick")
			self.floorImage.SetWindowHorizontalAlignCenter()
			self.floorImage.SetPosition(100, 80)
			self.floorImage.SetAlpha(0.0)
			self.floorImage.Show()

			# 맵이름 (ex: 아귀동굴) 이미지 로딩 & 표시
			try:
				floor = self.__GetDevilBase(x, y)
				print x, y, floor
				self.floorImage.LoadImage(LOCALE_PATH+"devil1_%df.tga" % floor)
			except RuntimeError:
				self.SetPosition(0, 80)
				self.floorImage.Hide()
				self.floorImage = None
			if locale.IsYMIR() or locale.IsWE_KOREA():	
				self.objectiveImage = ui.ExpandedImageBox()
				self.objectiveImage.AddFlag("not_pick")
				self.objectiveImage.SetWindowHorizontalAlignCenter()
				self.objectiveImage.SetPosition(0, 200)
				self.objectiveImage.SetAlpha(0.0)
				self.objectiveImage.Show()
				

				# 층별 목표 이미지 로딩 & 표시
				# 던전은 현재 몇층인지 알아오는 부분 때문에 하드코딩을 피하기가 힘들다...
				try:
					floor = self.__GetDevilBase(x, y)
					print x, y, floor
					self.objectiveImage.LoadImage(LOCALE_PATH + mapName + "/obj_%02df.tga" % floor)
				except RuntimeError:
					self.SetPosition(0, 80)
					self.objectiveImage.Hide()
					self.objectiveImage = None
								
		self.state = self.STATE_FADE_IN
		self.fadeStartTime = app.GetTime() + 1.0
		self.Show()
Пример #13
0
    def SetIcons(self, vnum, count, number):
        number = int(number)
        item.SelectItem(int(vnum))
        itemIcon = item.GetIconImageFileName()
        ItemPosis = [
            [240, {
                "32": 35,
                "64": 20,
                "96": 0
            }],
            [310, {
                "32": 56,
                "64": 36,
                "96": 26
            }],
            [378, {
                "32": 100,
                "64": 80,
                "96": 65
            }],
            [433, {
                "32": 170,
                "64": 143,
                "96": 133
            }],
            [445, {
                "32": 247,
                "64": 227,
                "96": 207
            }],
            [425, {
                "32": 325,
                "64": 305,
                "96": 295
            }],
            [373, {
                "32": 387,
                "64": 367,
                "96": 362
            }],
            [305, {
                "32": 427,
                "64": 408,
                "96": 392
            }],
            [230, {
                "32": 437,
                "64": 420,
                "96": 397
            }],
            [150, {
                "32": 423,
                "64": 400,
                "96": 383
            }],
            [80, {
                "32": 389,
                "64": 355,
                "96": 349
            }],
            [40, {
                "32": 240,
                "64": 218,
                "96": 208
            }],
            [50, {
                "32": 320,
                "64": 300,
                "96": 288
            }],
            [54, {
                "32": 167,
                "64": 140,
                "96": 127
            }],
            [97, {
                "32": 99,
                "64": 79,
                "96": 62
            }],
            [166, {
                "32": 52,
                "64": 32,
                "96": 12
            }],
        ]

        if number == 0:
            self.GUI = []
        IconImage = ui.ExpandedImageBox()
        IconImage.SetParent(self.Wheel)
        IconImage.LoadImage(itemIcon)
        IconImage.SetPosition(ItemPosis[number][0],
                              ItemPosis[number][1][str(IconImage.GetHeight())])
        IconImage.AddFlag("not_pick")
        IconImage.Show()
        self.GUI.append(IconImage)
Пример #14
0
 def __MenuFunction(self, value):
     if value == 1:
         self.title_name.SetText("Güçlü Buz Cadýsý")
         self.title_name_2.SetText("Seviye : 89")
         self.title_name_3.SetText("Bölge : Sürgün Maðarasý")
         self.title_name_4.SetText("Etkili Týlsým : Buz Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 4saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_1.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 1
     elif value == 2:
         self.title_name.SetText("Alev Kral")
         self.title_name_2.SetText("Seviye : 73")
         self.title_name_3.SetText("Bölge : Doyyumhwan")
         self.title_name_4.SetText("Etkili Týlsým : Ateþ Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 2saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_2.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 2
     elif value == 3:
         self.title_name.SetText("Kraliçe Örümcek")
         self.title_name_2.SetText("Seviye : 60")
         self.title_name_3.SetText("Bölge : Örümcek Zindaný")
         self.title_name_4.SetText("Etkili Týlsým : Rüzgar Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 2saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_3.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 3
     elif value == 4:
         self.title_name.SetText("Sarý Kaplan Hayaleti")
         self.title_name_2.SetText("Seviye : 75")
         self.title_name_3.SetText("Bölge : Hwang Tapýnaðý")
         self.title_name_4.SetText("Etkili Týlsým : Rüzgar Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 2saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_4.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 4
     elif value == 5:
         self.title_name.SetText("Ork Reisi")
         self.title_name_2.SetText("Seviye : 50")
         self.title_name_3.SetText("Bölge : Seungryong Vadisi")
         self.title_name_4.SetText("Etkili Týlsým : Bilinmiyor")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 20dakika")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_5.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 5
     elif value == 6:
         self.title_name.SetText("Dokuz Kuyruk")
         self.title_name_2.SetText("Seviye : 67")
         self.title_name_3.SetText("Bölge : Sohan Daðý")
         self.title_name_4.SetText("Etkili Týlsým : Buz Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 30dakika")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_6.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 6
     elif value == 7:
         self.title_name.SetText("Dev Çöl Kaplumbaðasý")
         self.title_name_2.SetText("Seviye : 67")
         self.title_name_3.SetText("Bölge : Yongbi Çölü")
         self.title_name_4.SetText("Etkili Týlsým : Rüzgar Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 20dakika")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_7.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 7
     elif value == 8:
         self.title_name.SetText("Dev Hayalet Aðaç")
         self.title_name_2.SetText("Seviye : 86")
         self.title_name_3.SetText("Bölge : Kýzýl Orman")
         self.title_name_4.SetText("Etkili Týlsým : Toprak Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 2,5saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_8.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 8
     elif value == 9:
         self.title_name.SetText("Komutan")
         self.title_name_2.SetText("Seviye : 95")
         self.title_name_3.SetText("Bölge : Sürgün Maðarasý")
         self.title_name_4.SetText("Etkili Týlsým : Þimþek Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 1saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_9.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 9
     elif value == 10:
         self.title_name.SetText("Karanlýk Hayalet Lider")
         self.title_name_2.SetText("Seviye : 62")
         self.title_name_3.SetText("Bölge : Hwang Tapýnaðý")
         self.title_name_4.SetText("Etkili Týlsým : Rüzgar Týlsýmý")
         self.title_name_5.SetText("Yeniden Çýkýþ Süresi : 2saat")
         self.BossTrackingImage = ui.ExpandedImageBox()
         self.BossTrackingImage.SetParent(self.board)
         self.BossTrackingImage.LoadImage(
             "d:/ymir work/patrontakip/slot_10.tga")
         self.BossTrackingImage.SetPosition(265 - 49, 95 + 194)
         self.BossTrackingImage.Show()
         constInfo.bosstracking = 10
Пример #15
0
 def __BuildLastItem(self, path):
     self.ItemIcon = ui.ExpandedImageBox()
     self.ItemIcon.SetParent(self.SlotBg)
     self.ItemIcon.SetPosition(0, 0)
     self.ItemIcon.LoadImage(path)
     self.ItemIcon.Show()
Пример #16
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
Пример #17
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 시 위치를 제대로 잡으려면 위치 갱신이 필요하다
Пример #18
0
	def LoadUI(self):
		if constInfo.PET_INFOS["gui"] == 1:
			constInfo.PET_INFOS["gui"] = 0
			self.__del__()
			return
		
		self.Board = ui.BoardWithTitleBar()
		self.Board.SetSize(400, 415)
		self.Board.SetCenterPosition()
		self.Board.AddFlag("movable")
		self.Board.AddFlag("float")
		self.Board.SetTitleName("Pet")
		self.Board.SetCloseEvent(self.__del__)
		self.Board.Show()
		
		self.tooltip = uiToolTip.ToolTip()  
		self.tooltip.HideToolTip()
		
		self.HeadBoard = ui.ThinBoard()
		self.HeadBoard.SetParent(self.Board)
		self.HeadBoard.SetPosition(15,35)
		self.HeadBoard.SetSize(370,80)
		self.HeadBoard.Show()
		
		self.PetItemSlotIMG = ui.ImageBox()
		self.PetItemSlotIMG.SetParent(self.HeadBoard)
		self.PetItemSlotIMG.SetPosition(15,17)
		self.PetItemSlotIMG.LoadImage("exterminatus/new_pet_images/pet_incu_slot_001.tga")
		self.PetItemSlotIMG.Show()
		
		self.PetItemVnumIMG = ui.ImageBox()
		self.PetItemVnumIMG.SetParent(self.PetItemSlotIMG)
		self.PetItemVnumIMG.SetPosition(4,4)
		self.PetItemVnumIMG.LoadImage("icon/item/55001.tga")
		self.PetItemVnumIMG.Show()
		
		self.PetNameSlotBar = ui.SlotBar()
		self.PetNameSlotBar.SetParent(self.HeadBoard)
		self.PetNameSlotBar.SetPosition(70,25)
		self.PetNameSlotBar.SetSize(225,19)
		self.PetNameSlotBar.Show()
			
		self.PetNameTextLine = ui.TextLine()
		self.PetNameTextLine.SetParent(self.PetNameSlotBar)
		self.PetNameTextLine.SetPosition(8,2)
		self.PetNameTextLine.SetText(str(constInfo.PET_INFOS["name"]))
		self.PetNameTextLine.Show()
		
		self.StatBoard = ui.ThinBoard()
		self.StatBoard.SetParent(self.Board)
		self.StatBoard.SetPosition(15,120)
		self.StatBoard.SetSize(370,120)
		self.StatBoard.Show()
		
		i = 0
		y = 15
		y_add = 120
		headlines = [["Level",36],["Erfahrung",28],["Laufzeit",32]]
		while i < 3:
			self.PetContentBoardTitleBars[i] = ui.HorizontalBar()
			self.PetContentBoardTitleBars[i].SetParent(self.StatBoard)
			self.PetContentBoardTitleBars[i].SetPosition(y,10)
			self.PetContentBoardTitleBars[i].Create(100)
			self.PetContentBoardTitleBars[i].Show()
			self.PetContentBoardTitleBars[i+10] = ui.TextLine()
			self.PetContentBoardTitleBars[i+10].SetParent(self.PetContentBoardTitleBars[i])
			self.PetContentBoardTitleBars[i+10].SetPosition(headlines[i][1],2)
			self.PetContentBoardTitleBars[i+10].SetText(str(headlines[i][0]))
			self.PetContentBoardTitleBars[i+10].Show()
			if i > 0:
				self.PetContentBoardTitleBars[i+100] = ui.ImageBox()
				self.PetContentBoardTitleBars[i+100].SetParent(self.StatBoard)
				self.PetContentBoardTitleBars[i+100].SetPosition(y-11,5)
				self.PetContentBoardTitleBars[i+100].LoadImage("exterminatus/new_pet_images/pet_trenn_line.tga")			
				self.PetContentBoardTitleBars[i+100].Show()
			
			i = i + 1
			y = y + y_add
			
		

		self.PetLevelSlotBar = ui.SlotBar()
		self.PetLevelSlotBar.SetParent(self.StatBoard)
		self.PetLevelSlotBar.SetPosition(15,35)
		self.PetLevelSlotBar.SetSize(98,19)
		self.PetLevelSlotBar.Show()
		self.PetLevelTextLine = ui.TextLine()
		self.PetLevelTextLine.SetParent(self.PetLevelSlotBar)
		self.PetLevelTextLine.SetPosition(39,2)
		self.PetLevelTextLine.SetText("  7")
		self.PetLevelTextLine.Show()		
		i = 0
		y = 142
		y_add = 17

		
		while i < 5:
			self.PetEXPBubble[i] = ui.ImageBox()
			self.PetEXPBubble[i].SetParent(self.StatBoard)
			self.PetEXPBubble[i].SetPosition(y,35)
			self.PetEXPBubble[i].LoadImage("exterminatus/new_pet_images/exp_bubble_empty.tga")
			self.PetEXPBubble[i].Show()	
			if i < 4: 
				self.expGauge[i] = ui.ExpandedImageBox()
				self.expGauge[i].SetParent(self.StatBoard)
				self.expGauge[i].SetPosition(y,35)
				self.expGauge[i].LoadImage("exterminatus/new_pet_images/exp_bubble_full.tga")
				self.expGauge[i].Show()
			else:
				self.ItemExpGauge[0] = ui.ExpandedImageBox()
				self.ItemExpGauge[0].SetParent(self.StatBoard)
				self.ItemExpGauge[0].SetPosition(y,35)
				self.ItemExpGauge[0].LoadImage("exterminatus/new_pet_images/exp_bubble_item.tga")
				self.ItemExpGauge[0].Show()
				
			i = i + 1
			y = y + y_add
		self.PetEXPBlock = ui.ImageBox()
		self.PetEXPBlock.SetParent(self.StatBoard)
		self.PetEXPBlock.SetPosition(142,35)
		self.PetEXPBlock.LoadImage("exterminatus/new_pet_images/pet_exp_block.tga")
		self.PetEXPBlock.Show()			
		self.SetExperience(0,2000)	
		self.SetItemExperience(0,2)
		# self.PetItemEXPSlotIMG = ui.ImageBox()
		# self.PetItemEXPSlotIMG.SetParent(self.StatBoard)
		# self.PetItemEXPSlotIMG.SetPosition(167,65)
		# self.PetItemEXPSlotIMG.LoadImage("d:/ymir work/ui/public/slot_base.sub")
		# self.PetItemEXPSlotIMG.Show()
		# self.PetItemEXPSlotItemIMG = ui.ImageBox()
		# self.PetItemEXPSlotItemIMG.SetParent(self.PetItemEXPSlotIMG)
		# self.PetItemEXPSlotItemIMG.SetPosition(0,0)
		# self.PetItemEXPSlotItemIMG.LoadImage("icon/item/55100.tga")
		# self.PetItemEXPSlotItemIMG.Show()
		# self.PetItemEXPSlotItemIMGCover = ui.ImageBox()
		# self.PetItemEXPSlotItemIMGCover.SetParent(self.PetItemEXPSlotIMG)
		# self.PetItemEXPSlotItemIMGCover.SetPosition(2,2)
		# self.PetItemEXPSlotItemIMGCover.LoadImage("exterminatus/new_pet_images/slot_block.tga")
		# self.PetItemEXPSlotItemIMGCover.Show()
		# self.PetItemEXPSlotItemIMGCover1 = ui.ImageBox()
		# self.PetItemEXPSlotItemIMGCover1.SetParent(self.PetItemEXPSlotIMG)
		# self.PetItemEXPSlotItemIMGCover1.SetPosition(2,2)
		# self.PetItemEXPSlotItemIMGCover1.LoadImage("exterminatus/new_pet_images/slot_block.tga")
		# self.PetItemEXPSlotItemIMGCover1.Show()
		
		# self.PetItemEXPSlotItemSlot = ui.GridSlotWindow()  
		# self.PetItemEXPSlotItemSlot.SetParent(self.PetItemEXPSlotIMG)  
		# self.PetItemEXPSlotItemSlot.ArrangeSlot(1,1,1,32,32,0,0)  
		# self.PetItemEXPSlotItemSlot.SetPosition(0, 0)  
		# #self.PetItemEXPSlotItemSlot.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip))  
		# #self.PetItemEXPSlotItemSlot.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip))  
		# self.PetItemEXPSlotItemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot))  
		# #self.PetItemEXPSlotItemSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.del_slot))  
		# self.PetItemEXPSlotItemSlot.Show()		
		
		
		
		self.PetLifeTimeSlotBar = ui.SlotBar()
		self.PetLifeTimeSlotBar.SetParent(self.StatBoard)
		self.PetLifeTimeSlotBar.SetPosition(255,35)
		self.PetLifeTimeSlotBar.SetSize(98,19)
		self.PetLifeTimeSlotBar.Show()
		self.PetLifeTimeTextLine = ui.TextLine()
		self.PetLifeTimeTextLine.SetParent(self.PetLifeTimeSlotBar)
		self.PetLifeTimeTextLine.SetPosition(18,2)
		self.PetLifeTimeTextLine.SetText("0")
		self.PetLifeTimeTextLine.Show()
		# self.PetLifeTimeSlotIMG = ui.ImageBox()
		# self.PetLifeTimeSlotIMG.SetParent(self.StatBoard)
		# self.PetLifeTimeSlotIMG.SetPosition(287,65)
		# self.PetLifeTimeSlotIMG.LoadImage("d:/ymir work/ui/public/slot_base.sub")
		# self.PetLifeTimeSlotIMG.Show()
		# self.PetLifeTimeSlotItemIMG = ui.ImageBox()
		# self.PetLifeTimeSlotItemIMG.SetParent(self.PetLifeTimeSlotIMG)
		# self.PetLifeTimeSlotItemIMG.SetPosition(0,0)
		# self.PetLifeTimeSlotItemIMG.LoadImage("icon/item/55102.tga")
		# self.PetLifeTimeSlotItemIMG.Show()
		# self.PetLifeTimeSlotItemIMGCover = ui.ImageBox()
		# self.PetLifeTimeSlotItemIMGCover.SetParent(self.PetLifeTimeSlotIMG)
		# self.PetLifeTimeSlotItemIMGCover.SetPosition(2,2)
		# self.PetLifeTimeSlotItemIMGCover.LoadImage("exterminatus/new_pet_images/slot_block.tga")
		# self.PetLifeTimeSlotItemIMGCover.Show()
		# self.PetLifeTimeSlotItemIMGCover1 = ui.ImageBox()
		# self.PetLifeTimeSlotItemIMGCover1.SetParent(self.PetLifeTimeSlotIMG)
		# self.PetLifeTimeSlotItemIMGCover1.SetPosition(2,2)
		# self.PetLifeTimeSlotItemIMGCover1.LoadImage("exterminatus/new_pet_images/slot_block.tga")
		# self.PetLifeTimeSlotItemIMGCover1.Show()

		# self.LifeTimeSlotItemSlot = ui.GridSlotWindow()  
		# self.LifeTimeSlotItemSlot.SetParent(self.PetLifeTimeSlotIMG)  
		# self.LifeTimeSlotItemSlot.ArrangeSlot(2,1,1,32,32,0,0)  
		# self.LifeTimeSlotItemSlot.SetPosition(0, 0)  
		# self.LifeTimeSlotItemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot))  
		# self.LifeTimeSlotItemSlot.Show()

		
		self.BoniBoard = ui.ThinBoard()
		self.BoniBoard.SetParent(self.Board)
		self.BoniBoard.SetPosition(15,245)
		self.BoniBoard.SetSize(370,100)
		self.BoniBoard.Show()		

		self.SkillBoard = ui.ThinBoard()
		self.SkillBoard.SetParent(self.Board)
		self.SkillBoard.SetPosition(15,350)
		self.SkillBoard.SetSize(370,50)
		self.SkillBoard.Show()
		
		i = 0
		x = 15
		list = 0
		boni = ["Verteidigung +75","Stark gegen Monster +20%","Chance auf krit. Treffer +10%"]
		while i < 3:
			self.PetBoni[i] = ui.TextLine()
			self.PetBoni[i].SetParent(self.BoniBoard)
			self.PetBoni[i].SetPosition(15,x)
			self.PetBoni[i].SetText("Bonus " + str(i+1) + ":")
			self.PetBoni[i].Show()
			self.PetBoni[i+3] = ui.TextLine()
			self.PetBoni[i+3].SetParent(self.BoniBoard)
			self.PetBoni[i+3].SetPosition(65,x)
			self.PetBoni[i+3].SetText(str(self.__CreateAffectString(self.PetAffects[list],self.PetAffects[list+1]*2)))
			self.PetBoni[i+3].SetFontColor(0.5411, 0.7254, 0.5568)
			self.PetBoni[i+3].Show()			
			list = list + 2
			i = i + 1
			x = x + 26
			
		self.PetSkillSlotBGImg = ui.ImageBox()
		self.PetSkillSlotBGImg.SetParent(self.SkillBoard)
		self.PetSkillSlotBGImg.SetPosition(8,8)
		self.PetSkillSlotBGImg.LoadImage("d:/ymir work/ui/public/slot_base.sub")
		self.PetSkillSlotBGImg.Show()			
		
		self.PetSkillSlotBGImg1 = ui.GridSlotWindow()  
		self.PetSkillSlotBGImg1.SetParent(self.PetSkillSlotBGImg)  
		self.PetSkillSlotBGImg1.ArrangeSlot(3,1,1,32,32,0,0)  
		self.PetSkillSlotBGImg1.SetPosition(0, 0)  
		#self.PetSkillSlotBGImg1.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip))  
		#self.PetSkillSlotBGImg1.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip))  
		#self.PetSkillSlotBGImg1.SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot))  
		self.PetSkillSlotBGImg1.SetSelectItemSlotEvent(ui.__mem_func__(self.ActivateSkill))  
		self.PetSkillSlotBGImg1.Show()
		self.PetSkillSlotBGImg1.SetItemSlot(3, 70002, constInfo.PET_INFOS["skill_level"])
		self.PetSkillNameTitle = ui.TextLine()
		self.PetSkillNameTitle.SetParent(self.SkillBoard)
		self.PetSkillNameTitle.SetPosition(45,8)
		self.PetSkillNameTitle.SetText("Automatisches aufheben")
		self.PetSkillNameTitle.Show()		
		self.PetSkillNameError = ui.TextLine()
		self.PetSkillNameError.SetParent(self.SkillBoard)
		self.PetSkillNameError.SetPosition(45,23)
		self.PetSkillNameError.SetText("Die Fertigkeit kann erst erlernt werden wenn dein Pet lv.10 ist.")
		self.PetSkillNameError.SetFontColor(0.9, 0.4745, 0.4627)
		self.PetSkillNameError.Show()		
		constInfo.PET_INFOS["gui"] = 1