def __MakeUniqueAuctionPage(self):

		page = self.pageWindow["UNIQUE_AUCTION"]

		LINE_COUNT = 3

		for i in xrange(LINE_COUNT):

			yPos = 5 + 99*i

			itemSlotImage = ui.MakeSlotBar(page, 10, yPos, 97, 97)
			page.Children.append(itemSlotImage)

			itemName = ui.MakeTextLine(page, False, 117, yPos + 14)
			page.Children.append(itemName)
			## Temporary
			itemName.SetText("선녀의 비녀")
			## Temporary

			curPrice = ui.MakeTextLine(page, False, 117, yPos + 31)
			page.Children.append(curPrice)
			## Temporary
			curPrice.SetText("현재가 : 20억 1234만 1234냥")
			## Temporary

			lastTime = ui.MakeTextLine(page, False, 117, yPos + 48)
			page.Children.append(lastTime)
			## Temporary
			lastTime.SetText("낙찰까지 남은 시간 : 19분 28초")
			## Temporary

			priceSlotImage = ui.MakeImageBox(page, "d:/ymir work/ui/public/Parameter_Slot_05.sub", 117, yPos + 65)
			priceSlot = ui.MakeTextLine(priceSlotImage)
			page.Children.append(priceSlotImage)
			page.Children.append(priceSlot)
			## Temporary
			priceSlot.SetText("20억 1234만 1234냥")
예제 #2
0
	def AddImageBox(self, x, y, fileName):
		return self.imageBoxList.append(ui.MakeImageBox(self, fileName, x, y))
예제 #3
0
    def __LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/AnnouncementWindow.py")
        except:
            import exception
            exception.Abort("AnnouncementDialog.Initialize.LoadObject")
        try:
            GetObject = self.GetChild
            self.children = {
                'background': {
                    'color_reversed': GetObject("bg1"),
                    'color_black': GetObject("bg2"),
                    'bar': GetObject("horizontalbar")
                },
                'main': {
                    'board':
                    GetObject("board"),
                    'titleBar':
                    GetObject("titlebar"),
                    'text_value':
                    GetObject("currentLine_Value"),
                    'textLimitChars':
                    GetObject("textLine1"),
                    'textLangSelected':
                    GetObject("textLine2"),
                    'buttonList': [
                        GetObject("btnNotice"),
                        GetObject("btnBigNotice"),
                        GetObject("btnMapNotice"),
                        GetObject("btnWhisper")
                    ],
                    'checkBox': {}
                },
                'events': [
                    GetObject("accept_button").SetEvent(self.AskQuestion),
                    GetObject("clear_button").SetEvent(self.SetFocus)
                ]
            }

        except:
            import exception
            exception.Abort("AnnouncementDialog.Initialize.BindObject")

        for i in xrange(app.LANGUAGE_MAX_NUM + 1):
            self.GetObject('main','checkBox').update({i: (
              ui.AnnouncementCheckBoxLanguage(self.GetObject('main','board'), \
               self.X_START + (self.X_ADD_SPACE * i), self.Y_START, lambda filter = i: self.OnSelectLanguage(filter)), \
              ui.MakeImageBox(self, LOCALE_PATH_FLAG % LOCALE_LANGUAGE_LIST[i], \
               (self.X_START * 2) + (self.X_ADD_SPACE * i), self.Y_START - self.Y_PARSER))
            })

        self.GetObject('main', 'titleBar').SetWidth(self.WIDTH_WINDOW)
        self.GetObject('main', 'titleBar').SetCloseEvent(self.Close)

        self.GetObject('main', 'text_value').SetSize(
            self.WIDTH_WINDOW,
            self.GetObject('main', 'text_value').GetHeight())
        self.GetObject('main', 'text_value').SetLimitWidth(self.WIDTH_WINDOW)
        self.GetObject('main', 'board').SetSize(
            self.WIDTH_WINDOW + self.Y_PARSER,
            self.GetObject('main', 'board').GetHeight())

        self.GetObject('background', 'color_reversed').SetSize(
            self.WIDTH_WINDOW,
            self.GetObject('background', 'color_reversed').GetHeight())
        self.GetObject('background', 'color_black').SetSize(
            self.WIDTH_WINDOW,
            self.GetObject('background', 'color_black').GetHeight())
        self.GetObject('background', 'bar').SetWidth(self.WIDTH_WINDOW)

        for (tabKey,
             tabButton) in enumerate(self.GetObject('main', 'buttonList')):
            tabButton.SAFE_SetEvent(self.ClickRadioButton, tabKey)
	def SetIconEvent(self, eventType):
		self.childrenList.append(ui.MakeImageBox(self.eventToolTip, self.BASE_ROOT_PATH.format(eventType.lower()), 5, self.eventToolTip.toolTipHeight))
	def LoadWindow(self):
		if self.isLoaded:
			return
		
		self.isLoaded = 1
		
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "uiscript/guildwindow_guilddragonlairranking.py")
		except:
			import exception
			exception.Abort("GuildDragonLairWindow.LoadDialog.LoadScript")
		
		self.DIFFERENCE = 17
		self.BOARD_WIDTH = 368
		
		try:
			self.titleBar = self.GetChild("TitleBar")
			self.scrollBar = self.GetChild("GuildDragonLairScrollBar")
			if localeInfo.IsARABIC():
				self.LeftTop = self.GetChild("LeftTop")
				self.RightTop = self.GetChild("RightTop")
				self.LeftBottom = self.GetChild("LeftBottom")
				self.RightBottom = self.GetChild("RightBottom")
				self.leftcenterImg = self.GetChild("leftcenterImg")
				self.rightcenterImg = self.GetChild("rightcenterImg")
				self.topcenterImg = self.GetChild("topcenterImg")
				self.bottomcenterImg = self.GetChild("bottomcenterImg")
				self.centerImg = self.GetChild("centerImg")
				self.LeftTopSelf = self.GetChild("LeftTopSelf")
				self.RightTopSelf = self.GetChild("RightTopSelf")
				self.LeftBottomSelf = self.GetChild("LeftBottomSelf")
				self.RightBottomSelf = self.GetChild("RightBottomSelf")
				self.topcenterImgSelf = self.GetChild("topcenterImgSelf")
				self.bottomcenterImgSelf = self.GetChild("bottomcenterImgSelf")
				
				self.LeftTop.SetPosition(318 + self.DIFFERENCE, 38)
				self.RightTop.SetPosition(17 + self.DIFFERENCE, 38)
				self.LeftBottom.SetPosition(318 + self.DIFFERENCE, 173)
				self.RightBottom.SetPosition(17 + self.DIFFERENCE, 173)
				self.leftcenterImg.SetPosition(317 + self.DIFFERENCE + 1, 38+16)
				self.rightcenterImg.SetPosition(17 + self.DIFFERENCE + 1, 38+16)
				self.topcenterImg.SetPosition(self.BOARD_WIDTH - (17 + 15 + self.DIFFERENCE), 38)
				self.bottomcenterImg.SetPosition(self.BOARD_WIDTH - (17 + 15 + self.DIFFERENCE), 173)
				self.centerImg.SetPosition(self.BOARD_WIDTH - (17 + 15 + self.DIFFERENCE), 38 + 15)
				
				self.LeftTopSelf.SetPosition(318 + self.DIFFERENCE, 190)
				self.RightTopSelf.SetPosition(17 + self.DIFFERENCE, 190)
				self.LeftBottomSelf.SetPosition(318 + self.DIFFERENCE, 190 + 15)
				self.RightBottomSelf.SetPosition(17 + self.DIFFERENCE, 190 + 15)
				
				self.topcenterImgSelf.SetPosition(self.BOARD_WIDTH - (17 + 15 + self.DIFFERENCE), 190)
				self.bottomcenterImgSelf.SetPosition(self.BOARD_WIDTH - (17 + 15 + self.DIFFERENCE),190 + 15)
		except:
			import exception
			exception.Abort("GuildDragonLairWindow.LoadDialog.BindObject")
		
		#build
		self.rankLine = []
		self.rankData = {
							"ID" : [],
							"NAME" : [],
							"MEMBERS" : [],
							"TIME" : [],
		}
		
		self.rankDataBackground = {
							"ID" : [],
							"NAME" : [],
							"MEMBERS" : [],
							"TIME" : [],
		}
		
		if localeInfo.IsARABIC():
			str_lineDown = "d:/ymir work/ui/game/guild/dragonlairranking/line_down_ae.sub"
		else:
			str_lineDown = "d:/ymir work/ui/game/guild/dragonlairranking/line_down.sub"
		
		for i in xrange(6):
			lineStep = 24
			yPos = i * lineStep + 64
			if i == 5:
				yPos = i * lineStep + 75
			
			if localeInfo.IsARABIC():
				line = ui.MakeImageBox(self, str_lineDown, 22 + self.DIFFERENCE, yPos)
			else:
				line = ui.MakeImageBox(self, str_lineDown, 22, yPos)
			
			self.rankLine.append(line)
			
			#ID_BACKGROUND = ui.MakeSlotBar(self.rankLine[i], 6, 2, 31, 16)
			ID_BACKGROUND = ui.Bar("TOP_MOST")
			ID_BACKGROUND.SetParent(self.rankLine[i])
			if localeInfo.IsARABIC():
				ID_BACKGROUND.SetPosition(270, 2)
			else:
				ID_BACKGROUND.SetPosition(6, 2)
			
			ID_BACKGROUND.SetSize(31, 16)
			ID_BACKGROUND.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.0))
			ID_BACKGROUND.Show()
			self.rankDataBackground["ID"].append(ID_BACKGROUND)
			
			#NAME_BACKGROUND = ui.MakeSlotBar(self.rankLine[i], 55, 2, 114, 16)
			NAME_BACKGROUND = ui.Bar("TOP_MOST")
			NAME_BACKGROUND.SetParent(self.rankLine[i])
			if localeInfo.IsARABIC():
				NAME_BACKGROUND.SetPosition(145, 2)
			else:
				NAME_BACKGROUND.SetPosition(55, 2)
			
			NAME_BACKGROUND.SetSize(114, 16)
			NAME_BACKGROUND.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.0))
			NAME_BACKGROUND.Show()
			self.rankDataBackground["NAME"].append(NAME_BACKGROUND)
			
			#MEMBERS_BACKGROUND = ui.MakeSlotBar(self.rankLine[i], 192, 2, 22, 16)
			MEMBERS_BACKGROUND = ui.Bar("TOP_MOST")
			MEMBERS_BACKGROUND.SetParent(self.rankLine[i])
			if localeInfo.IsARABIC():
				MEMBERS_BACKGROUND.SetPosition(92, 2)
			else:
				MEMBERS_BACKGROUND.SetPosition(192, 2)
			
			MEMBERS_BACKGROUND.SetSize(22, 16)
			MEMBERS_BACKGROUND.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.0))
			MEMBERS_BACKGROUND.Show()
			self.rankDataBackground["MEMBERS"].append(MEMBERS_BACKGROUND)
			
			#TIME_BACKGROUND = ui.MakeSlotBar(self.rankLine[i], 237, 2, 61, 16)
			TIME_BACKGROUND = ui.Bar("TOP_MOST")
			TIME_BACKGROUND.SetParent(self.rankLine[i])
			if localeInfo.IsARABIC():
				TIME_BACKGROUND.SetPosition(6, 2)
			else:
				TIME_BACKGROUND.SetPosition(241, 2)
			
			TIME_BACKGROUND.SetSize(61, 16)
			TIME_BACKGROUND.SetColor(grp.GenerateColor(0.0, 0.0, 0.0, 0.0))
			TIME_BACKGROUND.Show()
			self.rankDataBackground["TIME"].append(TIME_BACKGROUND)
			
			ID = ui.MakeTextLine(self.rankDataBackground["ID"][i])
			NAME = ui.MakeTextLine(self.rankDataBackground["NAME"][i])
			MEMBERS = ui.MakeTextLine(self.rankDataBackground["MEMBERS"][i])
			TIME = ui.MakeTextLine(self.rankDataBackground["TIME"][i])
			self.rankData["ID"].append(ID)
			self.rankData["NAME"].append(NAME)
			self.rankData["MEMBERS"].append(MEMBERS)
			self.rankData["TIME"].append(TIME)
		
		#self.AddRank(0, "Staff", "24", "23 minutes")
		self.AddRank(5, "-", "-", "-", "-")
		self.scrollBar.SetMiddleBarSize(0.95)
		self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
예제 #6
0
    def LoadWindow(self):
        self.UI["board"] = ui.BoardWithTitleBar()
        self.UI["board"].SetSize(500, 320)
        self.UI["board"].SetTitleName(uiScriptLocale.GIFT_WINDOW_NAME)
        self.UI["board"].SetCloseEvent(ui.__mem_func__(self.Close))
        self.UI["board"].AddFlag("movable")
        self.UI["board"].Hide()

        self.UI["slots"] = ui.GridSlotWindow()
        self.UI["slots"].SetParent(self.UI["board"])
        self.UI["slots"].SetPosition(10, 30)
        self.UI["slots"].SetSize(480, 280)
        self.UI["slots"].ArrangeSlot(0, 15, 8, 32, 32, 0, 0)
        self.UI["slots"].RefreshSlot()
        self.UI["slots"].SetSlotBaseImage(
            "d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)
        self.UI["slots"].SAFE_SetButtonEvent("LEFT", "EXIST",
                                             self.OnSelectItemSlot)
        self.UI["slots"].SAFE_SetButtonEvent("RIGHT", "EXIST",
                                             self.UnselectItemSlot)
        self.UI["slots"].SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        self.UI["slots"].SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        self.UI["slots"].Show()
        Y = self.UI["board"].GetHeight() - 30
        if POSITION_FIX:
            Y = self.UI["board"].GetHeight() - 43
        self.UI["get_button"] = ui.MakeButton(self.UI["board"], 250, Y, "",
                                              "d:/ymir work/ui/public/",
                                              "large_Button_01.sub",
                                              "large_Button_02.sub",
                                              "large_Button_03.sub")
        self.UI["get_button"].SetText(uiScriptLocale.GIFT_GET_ALL)
        self.UI["get_button"].SetEvent(lambda: self.GetAll())
        self.UI["get_button"].Show()

        self.UI["pageSlotImage"] = ui.MakeImageBox(
            self.UI["board"], "d:/ymir work/ui/public/Parameter_Slot_00.sub",
            self.UI["board"].GetWidth() - 110, Y)
        self.UI["pageSlot"] = ui.MakeTextLine(self.UI["pageSlotImage"])
        self.UI["pageSlot"].SetWindowHorizontalAlignCenter()
        self.UI["pageSlot"].SetHorizontalAlignCenter()
        self.UI["pageSlot"].SetText(
            str(self.pageCur) + " - " + str(self.pageNum + 1))
        self.UI["pageSlot"].Show()

        ## Prev Button
        self.UI["prevButton"] = ui.MakeButton(
            self.UI["board"], self.UI["board"].GetWidth() - 160, Y,
            uiScriptLocale.GIFT_PREV_PAGE, "d:/ymir work/ui/public/",
            "small_button_01.sub", "small_button_02.sub",
            "small_button_03.sub")
        self.UI["prevButton"].SetText("<<")
        self.UI["prevButton"].SetEvent(ui.__mem_func__(self.PrepPage), -1)

        ## Next Button
        self.UI["nextButton"] = ui.MakeButton(
            self.UI["board"], self.UI["board"].GetWidth() - 65, Y,
            uiScriptLocale.GIFT_NEXT_PAGE, "d:/ymir work/ui/public/",
            "small_button_01.sub", "small_button_02.sub",
            "small_button_03.sub")
        self.UI["nextButton"].SetText(">>")
        self.UI["nextButton"].SetEvent(ui.__mem_func__(self.PrepPage), 1)

        self.AddFlag("movable")
        self.AddFlag("float")
        self.SetCenterPosition()
        self.Show()