Example #1
0
    def LoadDialogSinglePage(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()

            if locale.IsARABIC():
                pyScrLoader.LoadScriptFile(
                    self,
                    uiScriptLocale.LOCALE_UISCRIPT_PATH + "HelpWindow.py")
            else:
                pyScrLoader.LoadScriptFile(self, "UIScript/HelpWindow.py")
        except:
            import exception
            exception.Abort("HelpWindow.LoadDialogSinglePage.LoadScript")

        try:
            GetObject = self.GetChild
            self.btnClose = GetObject("close_button")
        except:
            import exception
            exception.Abort("DialogWindow.LoadDialogSinglePage.BindObject")
Example #2
0
    def __CreateDialog(self):

        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self,
                                   "uiscript/inputdialogwithdescription2.py")

        try:
            getObject = self.GetChild
            self.board = getObject("Board")
            self.acceptButton = getObject("AcceptButton")
            self.cancelButton = getObject("CancelButton")
            self.inputSlot = getObject("InputSlot")
            self.inputValue = getObject("InputValue")
            self.description1 = getObject("Description1")
            self.description2 = getObject("Description2")

        except:
            import exception
            exception.Abort(
                "InputDialogWithDescription.LoadBoardDialog.BindObject")
Example #3
0
	def __CreateDialog(self):

		pyScrLoader = ui.PythonScriptLoader()
		if localeInfo.IsARABIC() :
			pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "inputdialogwithdescription.py")
		else:
			pyScrLoader.LoadScriptFile(self, "uiscript/inputdialogwithdescription.py")

		try:
			getObject = self.GetChild
			self.board = getObject("Board")
			self.acceptButton = getObject("AcceptButton")
			self.cancelButton = getObject("CancelButton")
			self.inputSlot = getObject("InputSlot")
			self.inputValue = getObject("InputValue")
			self.description = getObject("Description")

		except:
			import exception
			exception.Abort("InputDialogWithDescription.LoadBoardDialog.BindObject")
    def __LoadWindow(self, raceNum):
        if (self.isLoaded == TRUE):
            return

        self.isLoaded = TRUE
        try:
            PythonScriptLoader = ui.PythonScriptLoader()
            PythonScriptLoader.LoadScriptFile(self,
                                              "UIScript/skillchoosewindow.py")
        except:
            import exception
            exception.Abort("SelectJob.LoadWindow.LoadObject")

        try:
            self.__BindObjects()
        except:
            import exception
            exception.Abort("SelectJob.LoadWindow.BindObject")

        self.__BindEvents(raceNum)
Example #5
0
    def LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/AtlasWindow.py")
        except:
            import exception
            exception.Abort("AtlasWindow.LoadWindow.LoadScript")

        try:
            self.board = self.GetChild("board")
            self.titleBar = self.GetChild("TitleBar")
            # self.toolTipPos = self.GetChild("positionToolTip")
            self.enableGMJumpButton = self.GetChild("enableWarpWindowButton")
            self.enableGMJumpButton.SetEvent(self.ToggleGMJump)
        except:
            import exception
            exception.Abort("AtlasWindow.LoadWindow.BindObject")

        self.AtlasMainWindow = self.AtlasRenderer()

        self.toolTipPos = ui.TextLine()
        self.toolTipPos.SetParent(self.AtlasMainWindow)
        self.toolTipPos.SetOutline()
        self.toolTipPos.Hide()
        self.toolTipPos.SetTop()
        self.titleBar.SetCloseEvent(self.Hide)
        self.AtlasMainWindow.SetParent(self.board)
        self.AtlasMainWindow.SetPosition(12 + 13, 34 - 10 - 8)
        self.tooltipInfo.SetParent(self.board)
        self.infoGuildMark.SetParent(self.board)
        self.SetPosition(wndMgr.GetScreenWidth() - 136 - 256 - 10, 0)
        self.Hide()
        self.ClearBossIcons()
        self.MakeBossIcons()
        miniMap.RegisterAtlasWindow(self)

        self.warpWindow = ui.Window()
        self.warpWindow.SetParent(self.board)
        self.warpWindow.SetPosition(12 + 13, 34 - 10 - 8)
        self.warpWindow.Hide()
        self.warpWindow.SetMouseLeftButtonDownEvent(self.OnGMJump)
 def LoadWindow(self):
     try:
         pyScrLoader = ui.PythonScriptLoader()
         pyScrLoader.LoadScriptFile(self, "UIScript/PlayerRanking.py")
     except:
         import exception
         exception.Abort("PlayerRankingDialog.__LoadWindow.LoadScript")
     getObject = self.GetChild
     self.board = getObject("TitleBar")
     self.prevbtn = getObject("prev_button")
     self.prevfirstbtn = getObject("prev_first_button")
     self.nextbtn = getObject("next_button")
     self.nextlastbtn = getObject("next_last_button")
     self.CurrentPageText = getObject("CurrentPage")
     self.board.SetCloseEvent(ui.__mem_func__(self.Close))
     self.prevfirstbtn.SAFE_SetEvent(self.ChangePageFL, False)
     self.nextlastbtn.SAFE_SetEvent(self.ChangePageFL, True)
     self.prevbtn.SAFE_SetEvent(self.ChangePage, -1)
     self.nextbtn.SAFE_SetEvent(self.ChangePage, 1)
     self.ScrollBar = getObject("ScrollBar")
     self.ScrollBar.SetScrollEvent(ui.__mem_func__(self.OnScrollControl))
Example #7
0
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "UIScript/OfflineShop_BankDialog.py")
		except:
			import exception
			exception.Abort("OfflineShopBankDialog.LoadWindow.LoadScript")
			
		try:
			self.Board = self.GetChild("Board")
			self.currentMoneyLine = self.GetChild("CurrentMoneyLine")
			self.requiredMoneyLine = self.GetChild("RequiredMoneyLine")
			self.WithdrawMoneyButton = self.GetChild("withdraw_button")
			self.CancelButton = self.GetChild("cancel_button")
		except:
			import exception
			exception.Abort("OfflineShopBankDialog.LoadWindow.BindObject")
			
		self.Board.SetCloseEvent(ui.__mem_func__(self.Close))
		self.CancelButton.SetEvent(ui.__mem_func__(self.Close))
		self.WithdrawMoneyButton.SetEvent(ui.__mem_func__(self.WithdrawMoney))
Example #8
0
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "uiscript/chest_boxitems.py")

		except:
			import exception
			exception.Abort("UiChestBox.LoadWindow")

		try:
			for i in xrange(0,2):
				self.bg_items[i] = self.GetChild("CofresBoxItemsBg%s"%i)
				self.name_items[i] = self.GetChild("CofresBoxItemsName%s"%i)
				self.icon_items[i] = self.GetChild("CofresBoxItemsIcon%s"%i)
				self.icon_items[i].OnMouseOverIn= lambda selfArg = self, index = i: selfArg.OverInItem(index)
				self.icon_items[i].OnMouseOverOut = lambda selfArg = self, index = i: selfArg.OverOutItem(index)
				self.count_items[i] = self.GetChild("CofresBoxItemsCount%s"%i)
				self.bg_items[i].Hide()
		except:
			import exception
			exception.Abort("UiChestBoxElement.LoadWindow")
Example #9
0
    def LoadWindow(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            if constInfo.IN_GAME_SHOP_ENABLE:
                pyScrLoader.LoadScriptFile(
                    self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "WebWindow.py")
            else:
                pyScrLoader.LoadScriptFile(self, "UIScript/WebWindow.py")
        except:
            import exception
            exception.Abort("WebWindow.LoadDialog.LoadScript")

        try:
            GetObject = self.GetChild
            self.titleBar = GetObject("TitleBar")

        except:
            import exception
            exception.Abort("WebWindow.LoadDialog.BindObject")

        self.titleBar.SetCloseEvent(ui.__mem_func__(self.__OnCloseButtonClick))
Example #10
0
	def __LoadScript(self, fileName):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, fileName)	
		except:
			import exception
			exception.Abort("SelectEmpireWindow.__LoadScript.LoadObject")

		try:
			GetObject=self.GetChild
			self.leftButton		= GetObject("left_button")
			self.rightButton	= GetObject("right_button")
			self.selectButton	= GetObject("select_button")
			self.exitButton		= GetObject("exit_button")
			self.textBoard		= GetObject("text_board")
			self.empireArea[net.EMPIRE_A]	= GetObject("EmpireArea_A")
			self.empireArea[net.EMPIRE_B]	= GetObject("EmpireArea_B")
			self.empireArea[net.EMPIRE_C]	= GetObject("EmpireArea_C")
			self.empireAreaFlag[net.EMPIRE_A]	= GetObject("EmpireAreaFlag_A")
			self.empireAreaFlag[net.EMPIRE_B]	= GetObject("EmpireAreaFlag_B")
			self.empireAreaFlag[net.EMPIRE_C]	= GetObject("EmpireAreaFlag_C")
			self.empireFlag[net.EMPIRE_A]	= GetObject("EmpireFlag_A")
			self.empireFlag[net.EMPIRE_B]	= GetObject("EmpireFlag_B")
			self.empireFlag[net.EMPIRE_C]	= GetObject("EmpireFlag_C")
			GetObject("prev_text_button").SetEvent(ui.__mem_func__(self.PrevDescriptionPage))
			GetObject("next_text_button").SetEvent(ui.__mem_func__(self.NextDescriptionPage))
		except:
			import exception
			exception.Abort("SelectEmpireWindow.__LoadScript.BindObject")					

		self.selectButton.SetEvent(ui.__mem_func__(self.ClickSelectButton))
		self.exitButton.SetEvent(ui.__mem_func__(self.ClickExitButton))
		self.leftButton.SetEvent(ui.__mem_func__(self.ClickLeftButton))
		self.rightButton.SetEvent(ui.__mem_func__(self.ClickRightButton))
		for flag in self.empireAreaFlag.values():
			flag.SetAlpha(0.0)
		for flag in self.empireFlag.values():
			flag.SetAlpha(0.0)

		return 1
    def LoadObject(self):
        if self.isLoaded == 1:
            return

        try:
            self.isLoaded = 1
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/kingdomswar_window.py")
        except:
            import exception
            exception.Abort("Window.LoadObject.LoadObject")

        try:
            self.wndBoard = self.GetChild("board")
            self.ShinsooKills = self.GetChild("ShinsooKills")
            self.ChunjoKills = self.GetChild("ChunjoKills")
            self.JinnoKills = self.GetChild("JinnoKills")
            self.Deaths = self.GetChild("DeathsT")
            self.Clock = self.GetChild("ClockT")
        except:
            import exception
            exception.Abort("Window.LoadObject.BindObject")
Example #12
0
    def __LoadQuestionDialog(self):
        self.dlgQuestion = ui.ScriptWindow()

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self.dlgQuestion,
                                       "uiscript/questiondialog2.py")
        except:
            import exception
            exception.Abort("RefineDialog.__LoadQuestionDialog.LoadScript")

        try:
            GetObject = self.dlgQuestion.GetChild
            GetObject("message1").SetText(localeInfo.REFINE_DESTROY_WARNING)
            GetObject("message2").SetText(localeInfo.REFINE_WARNING2)
            GetObject("accept").SetEvent(ui.__mem_func__(self.Accept))
            GetObject("cancel").SetEvent(ui.__mem_func__(
                self.dlgQuestion.Hide))
        except:
            import exception
            exception.Abort(
                "SelectCharacterWindow.__LoadQuestionDialog.BindObject")
Example #13
0
    def __Load(self):
        self.popupDialog = PopupDialog(self)

        try:
            pyScrLoader = ui.PythonScriptLoader()
            if localeInfo.IsVIETNAM():
                pyScrLoader.LoadScriptFile(
                    self,
                    uiScriptLocale.LOCALE_UISCRIPT_PATH + "MarkListWindow.py")
            else:
                pyScrLoader.LoadScriptFile(self, "UIScript/MarkListWindow.py")
        except:
            import exception
            exception.Abort("MarkListBox.__Load")

        try:
            self.markListBox = self.__CreateMarkListBox()
            self.markListBox.SetScrollBar(self.GetChild("ScrollBar"))

            self.popupText = self.popupDialog.GetChild("message")
            self.popupDialog.GetChild("accept").SetEvent(
                ui.__mem_func__(self.popupDialog.Hide))

            self.board = self.GetChild("board")
            self.okButton = self.GetChild("ok")
            self.cancelButton = self.GetChild("cancel")
            self.refreshButton = self.GetChild("refresh")

        except:
            import exception
            exception.Abort("MarkListBox.__Bind")

        self.refreshButton.SetEvent(ui.__mem_func__(self.__OnRefresh))
        self.cancelButton.SetEvent(ui.__mem_func__(self.__OnCancel))
        self.okButton.SetEvent(ui.__mem_func__(self.__OnOK))
        self.board.SetCloseEvent(ui.__mem_func__(self.__OnCancel))
        self.UpdateRect()

        self.__RefreshFileList()
Example #14
0
	def __LoadDialog(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "passworddialog.py")
		except:
			import exception
			exception.Abort("PasswordDialog.__LoadDialog.LoadObject")

		try:
			self.passwordValue = self.GetChild("password_value")
			self.acceptButton = self.GetChild("accept_button")
			self.cancelButton = self.GetChild("cancel_button")
			self.titleName = self.GetChild("TitleName")
			self.GetChild("titlebar").SetCloseEvent(ui.__mem_func__(self.CloseDialog))
		except:
			import exception
			exception.Abort("PasswordDialog.__LoadDialog.BindObject")

		self.passwordValue.OnIMEReturn = self.OnAccept
		self.passwordValue.OnPressEscapeKey = self.OnCancel
		self.acceptButton.SetEvent(ui.__mem_func__(self.OnAccept))
		self.cancelButton.SetEvent(ui.__mem_func__(self.OnCancel))
Example #15
0
    def __LoadSystemMenu_Default(self):
        pyScrLoader = ui.PythonScriptLoader()
        if constInfo.IN_GAME_SHOP_ENABLE:
            pyScrLoader.LoadScriptFile(
                self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "SystemDialog.py")
        else:
            pyScrLoader.LoadScriptFile(self, "uiscript/systemdialog.py")

        self.GetChild("system_option_button").SAFE_SetEvent(
            self.__ClickSystemOptionButton)
        self.GetChild("game_option_button").SAFE_SetEvent(
            self.__ClickGameOptionButton)
        self.GetChild("change_button").SAFE_SetEvent(
            self.__ClickChangeCharacterButton)
        self.GetChild("logout_button").SAFE_SetEvent(self.__ClickLogOutButton)
        self.GetChild("exit_button").SAFE_SetEvent(self.__ClickExitButton)
        self.GetChild("help_button").SAFE_SetEvent(self.__ClickHelpButton)
        self.GetChild("cancel_button").SAFE_SetEvent(self.Close)

        if constInfo.IN_GAME_SHOP_ENABLE:
            self.GetChild("mall_button").SAFE_SetEvent(
                self.__ClickInGameShopButton)
Example #16
0
    def LoadWindow(self):
        if self.isLoaded:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/changelookwindow.py")

        except:
            import exception
            exception.Abort("ChangeLookWindow.LoadDialog.LoadScript")

        try:
            self.titleBar = self.GetChild("TitleBar")
            self.titleName = self.GetChild("TitleName")
            self.accept = self.GetChild("AcceptButton")
            self.cancel = self.GetChild("CancelButton")
            self.cost = self.GetChild("Cost")
            self.slot = self.GetChild("ChangeLookSlot")
        except:
            import exception
            exception.Abort("ChangeLookWindow.LoadDialog.BindObject")

        self.titleBar.SetCloseEvent(ui.__mem_func__(self.OnClose))
        self.titleName.SetText(localeInfo.CHANGE_LOOK_TITLE)
        self.cancel.SetEvent(ui.__mem_func__(self.OnClose))
        self.accept.SetEvent(ui.__mem_func__(self.OnPressAccept))
        self.cost.SetText(localeInfo.CHANGE_LOOK_COST %
                          (self.NumberToMoneyString(changelook.GetCost())))
        self.slot.SetSelectEmptySlotEvent(
            ui.__mem_func__(self.OnSelectEmptySlot))
        self.slot.SetUnselectItemSlotEvent(
            ui.__mem_func__(self.OnSelectItemSlot))
        self.slot.SetUseSlotEvent(ui.__mem_func__(self.OnSelectItemSlot))
        self.slot.SetOverInItemEvent(ui.__mem_func__(self.OnOverInItem))
        self.slot.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem))
        self.tooltipItem = None
Example #17
0
    def __LoadDialog(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "uiscript/bankwindow.py")

            self.GetChild("TitleBar").SetCloseEvent(
                ui.__mem_func__(self.BClose))
            self.Yang = self.GetChild("Yang")
            self.YangBank = self.GetChild("YangBank")
            self.EpBank = self.GetChild("EpBank")
            self.Epp = self.GetChild("Epp")
            self.WonBank = self.GetChild("Wonbannk")
            self.Wonn = self.GetChild("Wonn")
            self.GetChild("ChangePassword").SetEvent(
                ui.__mem_func__(self.OnChangePassword))
            self.GetChild("Yattir").SetEvent(ui.__mem_func__(self.Add))
            self.GetChild("Cehh").SetEvent(ui.__mem_func__(self.WithDraw))
            self.GetChild("Gonder").SetEvent(ui.__mem_func__(self.Gonderrrrr))
            self.GetChild("Gapat").SetEvent(ui.__mem_func__(self.BClose))
        except:
            import exception
            exception.Abort("[Error] in Bank System")
Example #18
0
	def __LoadWindow(self):
		# Try to load UIScript
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "UIScript/SlotMachineWindow.py")
		except:
			import exception
			exception.Abort("SlotMachineWindow.__LoadWindow")

		# Try to bind objects
		try:
			self.__BindObject()
		except:
			import exception
			exception.Abort("SlotMachineWindow.__BindObject")

		# Try to bind events
		try:
			self.__BindEvent()
		except:
			import exception
			exception.Abort("SlotMachineWindow.__BindEvent")
Example #19
0
    def __LoadSystemMenu_Default(self):
        pyScrLoader = ui.PythonScriptLoader()
        if constInfo.IN_GAME_SHOP_ENABLE:
            pyScrLoader.LoadScriptFile(self, "uiscript/systemdialog.py")
        else:
            pyScrLoader.LoadScriptFile(self, "uiscript/systemdialog.py")

        #self.chswitch = UiChannel.ChannelBoard()
        self.GetChild("system_option_button").SAFE_SetEvent(
            self.__ClickSystemOptionButton)
        self.GetChild("game_option_button").SAFE_SetEvent(
            self.__ClickGameOptionButton)
        self.GetChild("change_button").SAFE_SetEvent(
            self.__ClickChangeCharacterButton)
        self.GetChild("logout_button").SAFE_SetEvent(self.__ClickLogOutButton)
        self.GetChild("exit_button").SAFE_SetEvent(self.__ClickExitButton)
        #		self.GetChild("help_button").SAFE_SetEvent(self.__ClickHelpButton)
        self.GetChild("cancel_button").SAFE_SetEvent(self.Close)
        self.GetChild("sofort_button").SAFE_SetEvent(self.__ClickSofortButton)
        #self.GetChild("system_chhange_button").SAFE_SetEvent(self.__ClickChangeChannelButton)
        self.GetChild("openBrowser_WikiButton").SAFE_SetEvent(
            self.openBrowser_WikiButton)

        self.GetChild("system_chhange_1_button").SetEvent(
            self.__OnClickChannelSwitch, 1)
        self.GetChild("system_chhange_2_button").SetEvent(
            self.__OnClickChannelSwitch, 2)
        self.GetChild("system_chhange_3_button").SetEvent(
            self.__OnClickChannelSwitch, 3)
        self.GetChild("system_chhange_4_button").SetEvent(
            self.__OnClickChannelSwitch, 4)

        self.GetChild("system_chhange_1_button").Hide()
        self.GetChild("system_chhange_2_button").Hide()
        self.GetChild("system_chhange_3_button").Hide()
        self.GetChild("system_chhange_4_button").Hide()

        self.GetChild("system_option_button").Hide()
Example #20
0
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "UIScript/dicesystem.py")
		except:
			import exception
			exception.Abort("DiceDialog.LoadDialog.LoadScript")

		try:
			GetObject=self.GetChild
			self.Owner_Slot = GetObject("Owner_Slot")
			self.Owner_Slot.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectOwnerEmptySlot))
			self.Owner_Slot.SetOverInItemEvent(ui.__mem_func__(self.OverInOwnerItem))
			self.Owner_Slot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
			self.Owner_Number_Text = GetObject("Owner_Number_Text")
			self.Owner_Accept_Light = GetObject("Owner_Accept_Light")
			self.Owner_Accept_Light.Disable()
			
			self.Target_Slot = GetObject("Target_Slot")
			self.Target_Slot.SetOverInItemEvent(ui.__mem_func__(self.OverInTargetItem))
			self.Target_Slot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
			self.Target_Number_Text = GetObject("Target_Number_Text")
			self.Target_Accept_Light = GetObject("Target_Accept_Light")
			self.Target_Accept_Light.Disable()
			
			self.Owner_Number_Text.SetFontName("Tahoma:22")
			self.Target_Number_Text.SetFontName("Tahoma:22")

			self.TitleName = self.GetChild("TitleName")
			
			self.AcceptButton = self.GetChild("Owner_Accept_Button")
			self.AcceptButton.SetToggleDownEvent(ui.__mem_func__(self.AcceptExchange))
			self.GetChild("TitleBar").SetCloseEvent(net.SendExchangeExitPacket)
		except:
			import exception
			exception.Abort("dice.LoadDialog.BindObject")

		self.Show()
Example #21
0
        def __CreateDialog(self):
            try:
                pyScrLoader = ui.PythonScriptLoader()
                pyScrLoader.LoadScriptFile(self, "uiscript/shopinputdialog.py")

                getObject = self.GetChild
                self.board = getObject("Board")
                self.acceptButton = getObject("AcceptButton")
                self.cancelButton = getObject("CancelButton")
                self.inputSlot = getObject("InputSlot")
                self.inputValue = getObject("InputValue")

                self.colorDesc = getObject("ColorDesc")
                self.colorBG = getObject("ColorBG")
                for i in range(1, 7):
                    self.tabList["colorTab%d" % i] = getObject("ColorTab%d" %
                                                               i)
                    self.tabList["colorTab%d" % i].SetEvent(
                        ui.__mem_func__(self.CheckButtonStatus), i, "color")
                    self.tabList["colorTab%d" % i].Hide()

                    self.tabList["sizeTab%d" % i] = getObject("SizeTab%d" % i)
                    self.tabList["sizeTab%d" % i].SetEvent(
                        ui.__mem_func__(self.CheckButtonStatus), i, "size")

                    self.tabList["typeTab%d" % i] = getObject("TypeTab%d" % i)
                    self.tabList["typeTab%d" % i].SetEvent(
                        ui.__mem_func__(self.CheckButtonStatus), i, "type")
                self.colorDesc.Hide()
                self.colorBG.Hide()

            except:
                import sys
                (type, msg, tb) = sys.exc_info()
                dbg.TraceError("ShopInputDialog.__CreateDialog - %s:%s" %
                               (type, msg))
                app.Abort()
                return 0
Example #22
0
	def LoadWindow(self):
		if (self.isLoaded == 1):
			return
			
		self.isLoaded = 1
		try:
			PythonScriptLoader = ui.PythonScriptLoader()
			PythonScriptLoader.LoadScriptFile(self, "UIScript/OfflineShopAdminPanel.py")
		except:
			import exception
			exception.Abort("OfflineShopAdminPanelWindow.LoadWindow.LoadObject")
			
		try:
			self.board = self.GetChild("Board")
			self.openOfflineShopButton = self.GetChild("OpenOfflineShopButton")
			self.closeOfflineShopButton = self.GetChild("CloseOfflineShopButton")
			self.addItemButton = self.GetChild("AddItemButton")
			self.removeItemButton = self.GetChild("RemoveItemButton")
			self.changeTimeButton = self.GetChild("ChangeTimeButton")
			self.changePriceButton = self.GetChild("ChangePriceButton")
			self.myBankButton = self.GetChild("MyBankButton")
			self.btnGetBack = self.GetChild("GetBackButton")
			self.userName = self.GetChild("UserName")
		except:
			import exception
			exception.Abort("OfflineShopAdminPanelWindow.LoadWindow.BindObject")
			
		self.board.SetCloseEvent(ui.__mem_func__(self.Close))
		self.openOfflineShopButton.SetEvent(ui.__mem_func__(self.ClickOpenOfflineShopButton))
		self.closeOfflineShopButton.SetEvent(ui.__mem_func__(self.ClickCloseOfflineShopButton))
		self.addItemButton.SetEvent(ui.__mem_func__(self.ClickAddItemButton))
		self.removeItemButton.SetEvent(ui.__mem_func__(self.ClickRemoveItemButton))
		self.changeTimeButton.SetEvent(ui.__mem_func__(self.ClickChangeTimeButton))
		self.changePriceButton.SetEvent(ui.__mem_func__(self.ClickChangePriceButton))
		self.myBankButton.SetEvent(ui.__mem_func__(self.ClickMyBankButton))
		self.btnGetBack.SetEvent(ui.__mem_func__(self.ClickGetBackButton))
		
		net.SendRefreshOfflineShopMoney()
Example #23
0
    def __LoadWindow(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/auctionwindow.py")

        self.pageName = {
            "LIST": "매매 리스트",
            "REGISTER": "매매 등록",
            "UNIQUE_AUCTION": "유니크 경매",
        }
        self.pageWindow = {
            "LIST":
            self.PageWindow(self, "uiscript/auctionwindow_listpage.py"),
            "REGISTER":
            self.PageWindow(self, "uiscript/auctionwindow_registerpage.py"),
            "UNIQUE_AUCTION":
            self.PageWindow(self,
                            "uiscript/auctionwindow_uniqueauctionpage.py"),
        }

        self.board = self.GetChild("Board")
        self.tabDict = {
            "LIST": self.GetChild("Tab_01"),
            "REGISTER": self.GetChild("Tab_02"),
            "UNIQUE_AUCTION": self.GetChild("Tab_03"),
        }
        self.tabButtonDict = {
            "LIST": self.GetChild("Tab_Button_01"),
            "REGISTER": self.GetChild("Tab_Button_02"),
            "UNIQUE_AUCTION": self.GetChild("Tab_Button_03"),
        }
        for page in self.pageWindow.values():
            pyScrLoader.LoadScriptFile(page, page.GetScriptFileName())
        for key, button in self.tabButtonDict.items():
            button.SetEvent(self.SelectPage, key)

        self.__MakeListPage()
        self.__MakeRegisterPage()
        self.__MakeUniqueAuctionPage()
Example #24
0
	def __LoadQuestionDialog(self, fileName):
		self.dlgQuestion = ui.ScriptWindow()

		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self.dlgQuestion, fileName)
		except:
			import exception
			exception.Abort("SelectCharacterWindow.LoadQuestionDialog.LoadScript")

		try:
			GetObject=self.dlgQuestion.GetChild
			self.dlgQuestionText=GetObject("message")
			self.dlgQuestionAcceptButton=GetObject("accept")
			self.dlgQuestionCancelButton=GetObject("cancel")
		except:
			import exception
			exception.Abort("SelectCharacterWindow.LoadQuestionDialog.BindObject")

		self.dlgQuestionText.SetText(localeInfo.SELECT_DO_YOU_DELETE_REALLY)
		self.dlgQuestionAcceptButton.SetEvent(ui.__mem_func__(self.RequestDeleteCharacter))
		self.dlgQuestionCancelButton.SetEvent(ui.__mem_func__(self.dlgQuestion.Hide))
		return 1
Example #25
0
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "exscript/biologistitem.py")
		except:
			import exception
			exception.Abort("BiologistItem.LoadWindow.LoadObject")
			
		self.toolTip = uiToolTip.ItemToolTip()  
		self.toolTip.HideToolTip()	
		
		self.bar = self.GetChild("board")
		self.bar.SetOnClickEvent(self.OnItemClick)
		
		self.itemSlot = self.GetChild("itemSlot")
		self.itemSlot.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
		self.itemSlot.SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip))  
		self.itemSlot.SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip))		
		
		self.questName = self.GetChild("questName")
		self.questTimer = self.GetChild("timer")
		self.questCount = self.GetChild("progress")
		self.questPercent = self.GetChild("progressPercent")
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "UIScript/CubeResultWindow.py")
		except:
			import exception
			exception.Abort("CubeResultWindow.LoadDialog.LoadScript")

		try:
			GetObject=self.GetChild
			self.titleBar = GetObject("TitleBar")
			self.btnClose = GetObject("CloseButton")
			self.cubeSlot = GetObject("CubeSlot")

		except:
			import exception
			exception.Abort("CubeWindow.LoadDialog.BindObject")

		self.cubeSlot.SetOverInItemEvent(ui.__mem_func__(self.__OnOverInItem))
		self.cubeSlot.SetOverOutItemEvent(ui.__mem_func__(self.__OnOverOutItem))
		self.titleBar.SetCloseEvent(ui.__mem_func__(self.__OnCloseButtonClick))
		self.btnClose.SetEvent(ui.__mem_func__(self.__OnCloseButtonClick))
		self.itemVnum = 0
Example #27
0
	def LoadWindow(self):
		try:
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "uiscript/expandedmoneytaskbar.py")
		except:
			import exception
			exception.Abort("expandedmoneytaskbar.LoadWindow.LoadObject")
		
		try:
			self.wndMoney = self.GetChild("Money")
			
			self.wndMoneyIcon = self.GetChild("Money_Icon")
		except:
			import exception
			exception.Abort("expandedmoneytaskbar.LoadWindow.BindObject")
			
		try:
			self.wndGem = self.GetChild("Gem")
			
			self.wndGemSlotIcon = self.GetChild("Gem_Icon")
		except:
			import exception
			exception.Abort("expandedmoneytaskbar.LoadWindow.BindObject")
Example #28
0
    def LoadDialog(self):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/PickMoneyDialog.py")
        except:
            import exception
            exception.Abort("MoneyDialog.LoadDialog.LoadScript")

        try:
            self.board = self.GetChild("board")
            self.maxValueTextLine = self.GetChild("max_value")
            self.pickValueEditLine = self.GetChild("money_value")
            self.acceptButton = self.GetChild("accept_button")
            self.cancelButton = self.GetChild("cancel_button")
        except:
            import exception
            exception.Abort("MoneyDialog.LoadDialog.BindObject")

        self.pickValueEditLine.SetReturnEvent(ui.__mem_func__(self.OnAccept))
        self.pickValueEditLine.SetEscapeEvent(ui.__mem_func__(self.Close))
        self.acceptButton.SetEvent(ui.__mem_func__(self.OnAccept))
        self.cancelButton.SetEvent(ui.__mem_func__(self.Close))
        self.board.SetCloseEvent(ui.__mem_func__(self.Close))
Example #29
0
    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/CostumeWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            wndEquip = self.GetChild("CostumeSlot")
            self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(
                self.Close))

        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

        ## Equipment
        wndEquip.SetOverInItemEvent(
            ui.__mem_func__(self.wndInventory.OverInItem))
        wndEquip.SetOverOutItemEvent(
            ui.__mem_func__(self.wndInventory.OverOutItem))
        wndEquip.SetUnselectItemSlotEvent(
            ui.__mem_func__(self.wndInventory.UseItemSlot))
        wndEquip.SetUseSlotEvent(ui.__mem_func__(
            self.wndInventory.UseItemSlot))
        wndEquip.SetSelectEmptySlotEvent(
            ui.__mem_func__(self.wndInventory.SelectEmptySlot))
        wndEquip.SetSelectItemSlotEvent(
            ui.__mem_func__(self.wndInventory.SelectItemSlot))

        self.wndEquip = wndEquip
Example #30
0
    def __LoadScript(self, fileName):
        try:
            ui.PythonScriptLoader().LoadScriptFile(self, fileName)

            self.loginBoard                = self.GetChild("LoginBoard")
            # self.serverInfo                = self.GetChild("ConnectName")
            self.loginButton            = self.GetChild("LoginButton")
            self.loginExitButton        = self.GetChild("LoginExitButton")
            self.idEditLines			= self.GetChild("id_editlines")
            self.pwdEditLines			= self.GetChild("pwd_editlines")
            self.buttonExpand			= self.GetChild("buttonExpand")
            self.buttonMinimize			= self.GetChild("buttonMinimize")
            self.accountSaveBoardSave			= self.GetChild("accountLog")
            self.buttonMinimize.Hide()
            self.accountSaveBoardSave.Hide()

            self.accountText = {
                0 : self.GetChild("account_1"),
                1 : self.GetChild("account_2"),
                2 : self.GetChild("account_3"),
                3 : self.GetChild("account_4")}

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

        self.LoginInputs()
        self.ChannelSelectFunction()
        self.clickOnTextLinks()
        self.saveAccountChenars()
        self.loginButton.SetEvent(ui.__mem_func__(self.__OnClickLoginButton))
        self.GetChild("LoginExitButton").SetEvent(ui.__mem_func__(self.OnPressExitKey))
        self.buttonExpand.SetEvent(lambda : self.hideAndShow(0))
        self.buttonMinimize.SetEvent(lambda : self.hideAndShow(1))

        ####
        self.toolTipSaveButton = uitooltipGold.ToolTip()