コード例 #1
0
    def MakeUiBoard(self):
        yPos = 0
        for i in range(0, self.MAX_LINE_COUNT + 1):
            yPos = 60 + i * 24
            if i == 10:
                yPos += 10

            RankingSlotImage = ui.MakeImageBox(
                self, "d:/ymir work/ui/public/parameter_slot_00.sub", 23, yPos)
            RankingSlotImage.SetAlpha(0)
            RankingSlot = ui.MakeTextLine(RankingSlotImage)
            self.Children.append(RankingSlotImage)
            self.Children.append(RankingSlot)

            NameImage = ui.MakeImageBox(
                self, "d:/ymir work/ui/public/parameter_slot_04.sub", 77, yPos)
            NameImage.SetAlpha(0)
            NameSlot = ui.MakeTextLine(NameImage)
            self.Children.append(NameImage)
            self.Children.append(NameSlot)

            LevelImage = ui.MakeImageBox(
                self, "d:/ymir work/ui/public/parameter_slot_00.sub", 205,
                yPos)
            LevelImage.SetAlpha(0)
            LevelSlot = ui.MakeTextLine(LevelImage)
            self.Children.append(LevelImage)
            self.Children.append(LevelSlot)

            GuildImage = ui.MakeImageBox(
                self, "d:/ymir work/ui/public/parameter_slot_00.sub", 270,
                yPos)
            GuildImage.SetAlpha(0)
            GuildSlot = ui.MakeTextLine(GuildImage)
            self.Children.append(GuildImage)
            self.Children.append(GuildSlot)

            if i < self.MAX_LINE_COUNT:
                temprankingslotlist = []
                temprankingslotlist.append(RankingSlot)
                temprankingslotlist.append(NameSlot)
                temprankingslotlist.append(LevelSlot)
                temprankingslotlist.append(GuildSlot)
                self.ResultSlotList[i] = temprankingslotlist
            else:
                self.MyResultSlotList.append(RankingSlot)
                self.MyResultSlotList.append(NameSlot)
                self.MyResultSlotList.append(LevelSlot)
                self.MyResultSlotList.append(GuildSlot)

            itemSlotButtonImage = ui.MakeButton(
                self, 21, yPos, "",
                "d:/ymir work/ui/game/guild/dragonlairranking/",
                "ranking_list_button01.sub", "ranking_list_button02.sub",
                "ranking_list_button02.sub")
            itemSlotButtonImage.Show()
            itemSlotButtonImage.Disable()
            self.Children.append(itemSlotButtonImage)
            if i < self.MAX_LINE_COUNT:
                self.ResultButtonList.append(itemSlotButtonImage)
コード例 #2
0
	def __CreateModeButtons(self):

		self.modeTitle = ui.MakeTextLine(self)
		self.modeTitle.SetText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE)

		self.modeButtonList = {}

		level = ui.RadioButton()
		level.SetParent(self)
		level.SetWindowHorizontalAlignCenter()
		level.SetEvent(ui.__mem_func__(self.OnClickEXPLevel))
		level.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
		level.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
		level.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
		level.SetText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE_LEVEL)
		level.SetToolTipText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE_LEVEL_TOOLTIP, 70)
		level.Show()
		self.modeButtonList[player.PARTY_EXP_NON_DISTRIBUTION] = level

		parity = ui.RadioButton()
		parity.SetParent(self)
		parity.SetWindowHorizontalAlignCenter()
		parity.SetEvent(ui.__mem_func__(self.OnClickEXPDistributeParity))
		parity.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
		parity.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
		parity.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
		parity.SetText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE_PARITY)
		parity.SetToolTipText(localeInfo.PARTY_EXP_DISTRIBUTION_MODE_PARITY_TOOLTIP, 70)
		parity.Show()
		self.modeButtonList[player.PARTY_EXP_DISTRIBUTION_PARITY] = parity

		self.ChangePartyParameter(self.distributionMode)
コード例 #3
0
    def Load(self, data):
        title = data["name"]
        if len(title) > 22:
            title = title[:19] + "..."
        gui = {}
        gui["nameTextImage"] = ui.MakeImageBox(
            self.UI["board"], "d:/ymir work/ui/public/Parameter_Slot_04.sub",
            10, self.BoardHeight)
        gui["nameTextImage"].SAFE_SetStringEvent(
            "MOUSE_OVER_IN", lambda arg=data: self.__ShowToolTip(arg), TRUE)
        gui["nameTextImage"].SAFE_SetStringEvent("MOUSE_OVER_OUT",
                                                 self.__HideItemToolTip)
        gui["name"] = ui.MakeTextLine(gui["nameTextImage"])
        gui["name"].SetWindowHorizontalAlignCenter()
        gui["name"].SetHorizontalAlignCenter()
        gui["name"].SetText(title)

        gui["manage"] = ui.MakeButton(self.UI["board"], 130, self.BoardHeight,
                                      "", "d:/ymir work/ui/public/",
                                      "middle_Button_01.sub",
                                      "middle_Button_02.sub",
                                      "middle_Button_03.sub")
        gui["manage"].SetText(uiScriptLocale.SHOP_MANAGE)
        gui["manage"].SetEvent(ui.__mem_func__(self.ManageShop), data)
        gui["manage"].Show()
        if self.CurrentEdit == data["id"]:
            self.ManageShop(data, 1)
        gui["data"] = data
        self.UI["shops"][str(data["id"])] = gui
        self.BoardHeight += 30
        self.UpdateSize()
コード例 #4
0
    def __MakeListPage(self):

        page = self.pageWindow["LIST"]

        yPos = 27

        AUCTION_LINE_COUNT = 10

        for i in xrange(AUCTION_LINE_COUNT):

            numberSlotImage = ui.MakeImageBox(
                page, "d:/ymir work/ui/public/Parameter_Slot_00.sub", 11, yPos)
            numberSlot = ui.MakeTextLine(numberSlotImage)
            page.Children.append(numberSlotImage)
            page.Children.append(numberSlot)

            nameSlotImage = ui.MakeImageBox(
                page, "d:/ymir work/ui/public/Parameter_Slot_04.sub", 55, yPos)
            nameSlot = ui.MakeTextLine(nameSlotImage)
            page.Children.append(nameSlotImage)
            page.Children.append(nameSlot)

            priceSlotImage = ui.MakeImageBox(
                page, "d:/ymir work/ui/public/Parameter_Slot_05.sub", 175,
                yPos)
            priceSlot = ui.MakeTextLine(priceSlotImage)
            page.Children.append(priceSlotImage)
            page.Children.append(priceSlot)

            deleteButton = ui.Button()
            deleteButton.SetParent(page)
            deleteButton.SetPosition(310, yPos)
            deleteButton.SetUpVisual(
                "d:/ymir work/ui/public/small_button_01.sub")
            deleteButton.SetOverVisual(
                "d:/ymir work/ui/public/small_button_02.sub")
            deleteButton.SetDownVisual(
                "d:/ymir work/ui/public/small_button_03.sub")
            deleteButton.SetText("구입")
            deleteButton.Show()
            page.Children.append(deleteButton)

            yPos += 20
コード例 #5
0
    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냥")
コード例 #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()
コード例 #7
0
ファイル: ui_wrapper.py プロジェクト: Reizonr1/metin2-adv
	def __init__(self):
		ui.Window.__init__(self)
		self.x = 0
		self.y = 0
		self.width = 0
		self.height = 0
		self.isSelected = FALSE
		self.isOver = FALSE
		self.isListOpened = FALSE
		self.event = lambda *arg: None
		self.enable = TRUE

		self.textLine = ui.MakeTextLine(self)
		self.textLine.SetText(localeInfo.UI_ITEM)

		self.listBox = self.ListBoxWithBoard("TOP_MOST")
		self.listBox.SetPickAlways()
		self.listBox.SetParent(self)
		self.listBox.SetEvent(ui.__mem_func__(self.OnSelectItem))
		self.listBox.Hide()
コード例 #8
0
    def __LoadScript(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/GuildStorageAdmin.py")
        except:
            import exception
            exception.Abort("test.__LoadScript.LoadObject")

        try:
            self.board = self.GetChild("Board")
            self.titleBar = self.GetChild("TitleBar")
            self.AddMemberButton = self.GetChild("GS_AddMember")
            self.MemberInput = self.GetChild("GS_MemberInputLine")
            self.scrollbar = self.GetChild("scrollbar")

            self.scrollbar.SetScrollEvent(ui.__mem_func__(self.__OnScroll))

            self.MemberPage = {}

            for i in range(12):
                event = lambda argSelf=proxy(
                    self), argIndex=i, argAuthority=0: apply(
                        argSelf.OnCheckAuthority, (argIndex, argAuthority))
                self.MemberPage['stock' + str(i)] = (CheckBox(
                    self.board, 130, 60 + (20 * i), event))

                event = lambda argSelf=proxy(
                    self), argIndex=i, argAuthority=1: apply(
                        argSelf.OnCheckAuthority, (argIndex, argAuthority))
                self.MemberPage['transfer' + str(i)] = (CheckBox(
                    self.board, 190, 60 + (20 * i), event))

                event = lambda argSelf=proxy(
                    self), argIndex=i, argAuthority=2: apply(
                        argSelf.OnCheckAuthority, (argIndex, argAuthority))
                self.MemberPage['payin' + str(i)] = (CheckBox(
                    self.board, 250, 60 + (20 * i), event))

                event = lambda argSelf=proxy(
                    self), argIndex=i, argAuthority=3: apply(
                        argSelf.OnCheckAuthority, (argIndex, argAuthority))
                self.MemberPage['payout' + str(i)] = (CheckBox(
                    self.board, 310, 60 + (20 * i), event))

                self.MemberPage['membername_slotbar' +
                                str(i)] = ui.MakeSlotBar(
                                    self.board, 20, 61 + (20 * i), 100, 16)
                self.MemberPage['membername_text' + str(i)] = ui.MakeTextLine(
                    self.MemberPage['membername_slotbar' + str(i)])

                self.MemberPage['deleteBTN' + str(i)] = ui.MakeButton(
                    self.board, 365, 61 + (20 * i), "loeschen",
                    "d:/ymir work/ui/public/", "close_button_01.sub",
                    "close_button_02.sub", "close_button_03.sub")
                self.MemberPage['deleteBTN' + str(i)].SetEvent(
                    ui.__mem_func__(self.DeleteMember), i)

        except:
            import exception
            exception.Abort("test.__LoadScript.BindObject")

        self.AddMemberButton.SetEvent(self.AddMember)
        self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
        self.isLoaded = TRUE
コード例 #9
0
	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))