def Open(self, maxValue, unitValue=1): if localeInfo.IsYMIR() or localeInfo.IsCHEONMA( ) or localeInfo.IsHONGKONG(): unitValue = "" width = self.GetWidth() (mouseX, mouseY) = wndMgr.GetMousePosition() if mouseX + width / 2 > wndMgr.GetScreenWidth(): xPos = wndMgr.GetScreenWidth() - width elif mouseX - width / 2 < 0: xPos = 0 else: xPos = mouseX - width / 2 self.SetPosition(xPos, mouseY - self.GetHeight() - 20) if localeInfo.IsARABIC(): self.maxValueTextLine.SetText("/" + str(maxValue)) else: self.maxValueTextLine.SetText(" / " + str(maxValue)) self.pickValueEditLine.SetText(str(unitValue)) self.pickValueEditLine.SetFocus() ime.SetCursorPosition(1) self.unitValue = unitValue self.maxValue = maxValue self.Show() self.SetTop()
def OnUpdate(self): if self.isLoaded == 1: targetLocation = wndMgr.GetScreenHeight() - 170 if self.pos_height > targetLocation: self.pos_height = self.pos_height - 5 self.SetPosition(wndMgr.GetScreenWidth() / 2 - 150 + 5, self.pos_height) else: if self.isLoaded == 1: self.isLoaded = 2 self.delay = app.GetTime() + 5 if self.isLoaded == 2 and self.delay < app.GetTime(): if self.MainBGThinBoard.IsIn(): return targetLocation = wndMgr.GetScreenWidth() + 50 if self.pos_height < targetLocation: self.pos_height = self.pos_height + 25 self.SetPosition(wndMgr.GetScreenWidth() / 2 - 150 + 5, self.pos_height) else: if self.isLoaded == 2: self.isLoaded = 0 self.index = 0 self.Hide()
def OnUpdate(self): if self.isLoaded == 1: targetLocation = wndMgr.GetScreenWidth() - 350 #chat.AppendChat(chat.CHAT_TYPE_INFO,"targetLocation " + str(targetLocation)) if self.pos_width > targetLocation: self.pos_width = self.pos_width - 15 self.SetPosition(self.pos_width, wndMgr.GetScreenHeight() - 150) #chat.AppendChat(chat.CHAT_TYPE_INFO,"pos_width " + str(self.pos_width)) else: if self.isLoaded == 1: self.isLoaded = 2 self.delay = app.GetTime() + 5 if self.isLoaded == 2 and self.delay < app.GetTime(): targetLocation = wndMgr.GetScreenWidth() + 350 #chat.AppendChat(chat.CHAT_TYPE_INFO,"targetLocation " + str(targetLocation)) if self.pos_width < targetLocation: self.pos_width = self.pos_width + 25 self.SetPosition(self.pos_width, wndMgr.GetScreenHeight() - 150) #chat.AppendChat(chat.CHAT_TYPE_INFO,"pos_width " + str(self.pos_width)) else: if self.isLoaded == 2: self.isLoaded = 0 self.Hide()
def OnUpdate(self): if self.end: return if self.biologWindow_sliding: if app.GetGlobalTimeStamp( ) >= self.next_move and BIOLOG_BINARY_LOADED["coordonates"][ 0] != wndMgr.GetScreenHeight() - 50 + 500: self.loader_['default'][0].SetPosition( wndMgr.GetScreenWidth() / 2 + 158, BIOLOG_BINARY_LOADED["coordonates"][0] - 10) BIOLOG_BINARY_LOADED["coordonates"][ 0] = BIOLOG_BINARY_LOADED["coordonates"][0] - 5 self.next_move = app.GetGlobalTimeStamp() if BIOLOG_BINARY_LOADED["coordonates"][ 0] == wndMgr.GetScreenHeight() - 50 + 500: self.biologWindow_sliding = 0 self.next_move = app.GetGlobalTimeStamp() + 3 else: if app.GetGlobalTimeStamp( ) >= self.next_move and BIOLOG_BINARY_LOADED["coordonates"][ 0] != wndMgr.GetScreenHeight() - 50 + 900: self.loader_['default'][0].SetPosition( wndMgr.GetScreenWidth() / 2 + 158, BIOLOG_BINARY_LOADED["coordonates"][0] + 10) BIOLOG_BINARY_LOADED["coordonates"][ 0] = BIOLOG_BINARY_LOADED["coordonates"][0] + 5 self.next_move = app.GetGlobalTimeStamp() if BIOLOG_BINARY_LOADED["coordonates"][ 0] == wndMgr.GetScreenHeight() - 50 + 900: self.end = 1 self.CloseInfoBoard()
def initData(self): if self.Loaded > 0: self.Show() return self.Loaded = 1 self.Background = ui.Bar() self.Background.SetParent(self) self.Background.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.Background.SetPosition(0,0) self.Background.SetColor(grp.GenerateColor(0.0,0.0,0.0,150.0/255.0)) self.Background.Show() self.MainImage = ui.ImageBox() self.MainImage.SetParent(self.Background) self.MainImage.LoadImage("d:/ymir work/ui/main.tga") self.MainImage.SetSize(642,600) self.MainImage.SetCenterPosition() self.MainImage.Show() self.CloseButton = ui.Button() self.CloseButton.SetParent(self) self.CloseButton.SetPosition(wndMgr.GetScreenWidth()/2-350, wndMgr.GetScreenHeight()/2+200) self.CloseButton.SetUpVisual("d:/ymir work/ui/close_n.tga") self.CloseButton.SetOverVisual("d:/ymir work/ui/close_h.tga") self.CloseButton.SetDownVisual("d:/ymir work/ui/close_a.tga") self.CloseButton.SetEvent(ui.__mem_func__(self.Open)) self.CloseButton.Show() self.MapName = ui.ImageBox() self.MapName.SetParent(self) self.MapName.SetPosition(wndMgr.GetScreenWidth()/2+300, wndMgr.GetScreenHeight()/2+200) self.MapName.LoadImage("d:/ymir work/ui/info.tga") self.MapName.SetSize(162,50) self.MapName.Hide() self.MapNameText = ui.TextLine() self.MapNameText.SetParent(self.MapName) self.MapNameText.SetHorizontalAlignCenter() self.MapNameText.SetPosition(81,18) self.MapNameText.SetText("Teleportieren") self.MapNameText.Show() points = [[72,82],[94,172],[52,257],[124,232],[239,204],[301,153],[70,307],[157,326],[198,282],[322,199],[365,178],[419,98],[484,120],[540,153],[539,221],[454,199],[415,237],[452,261],[447,297],[457,365],[499,377],[517,412],[435,442],[368,497],[404,545],[258,370],[201,397],[304,282],[419,361],[367,300],[520,315]] self.data = [] for pos in xrange(len(points)): button = ui.Button() button.SetParent(self.MainImage) button.SetPosition(points[pos][0],points[pos][1]) button.SetUpVisual("d:/ymir work/ui/click_n.tga") button.SetOverVisual("d:/ymir work/ui/click_h.tga") button.SetDownVisual("d:/ymir work/ui/click_a.tga") button.SetEvent(ui.__mem_func__(self.WarpPosition),pos) button.Show() self.data.append(button) self.Show()
def OnUpdate(self): x = 0 y = 0 width = self.GetWidth() height = self.toolTipHeight if -1 == self.xPos and -1 == self.yPos: (mouseX, mouseY) = wndMgr.GetMousePosition() if mouseY < wndMgr.GetScreenHeight() - 300: y = mouseY + 40 else: y = mouseY - height - 30 x = mouseX - width / 2 else: x = self.xPos - width / 2 y = self.yPos - height x = max(x, 0) y = max(y, 0) x = min(x + width / 2, wndMgr.GetScreenWidth() - width / 2) - width / 2 y = min(y + self.GetHeight(), wndMgr.GetScreenHeight()) - self.GetHeight() parentWindow = self.GetParentProxy() if parentWindow: (gx, gy) = parentWindow.GetGlobalPosition() x -= gx y -= gy self.SetPosition(x, y)
def Open(self): self.SetPosition((wndMgr.GetScreenWidth() / 2) - int(math.floor(self.GetWidth() / 2.)), (wndMgr.GetScreenHeight() / 2) - int(math.floor(self.GetHeight() / 2.))) (self.xStart, self.yStart, z) = player.GetMainCharacterPosition() self.Show()
def __ArrangeQuestButton(self): screenWidth = wndMgr.GetScreenWidth() screenHeight = wndMgr.GetScreenHeight() ##!! 20061026.levites.퀘스트_위치_보정 if self.wndParty.IsShow(): xPos = 100 + 30 else: xPos = 20 if localeInfo.IsARABIC(): xPos = xPos + 15 yPos = 170 * screenHeight / 600 yCount = (screenHeight - 330) / 63 count = 0 for btn in self.questButtonList: btn.SetPosition(xPos + (int(count/yCount) * 100), yPos + (count%yCount * 63)) count += 1 global IsQBHide if IsQBHide: btn.Hide() else: btn.Show()
def OnRender(self): grp.ClearDepthBuffer() grp.SetGameRenderState() grp.PushState() grp.SetOmniLight() screenWidth = wndMgr.GetScreenWidth() screenHeight = wndMgr.GetScreenHeight() newScreenWidth = float(screenWidth+30) newScreenHeight = float(screenHeight+30) grp.SetViewport(270.0/screenWidth, 0.0, newScreenWidth/screenWidth, newScreenHeight/screenHeight) app.SetCenterPosition(20.0, -470.0, -100.0) app.SetCamera(2800.0, 15.0, 180.0, 102.0) grp.SetPerspective(10.0, newScreenWidth/newScreenHeight, 1000.0, 4000.0) (x, y) = app.GetCursorPosition() grp.SetCursorPosition(x, y) chr.Deform() chr.Render() grp.RestoreViewport() grp.PopState() grp.SetInterfaceRenderState()
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") except: import exception exception.Abort("AtlasWindow.LoadWindow.BindObject") self.AtlasMainWindow = self.AtlasRenderer() self.board.SetCloseEvent(self.Hide) self.AtlasMainWindow.SetParent(self.board) self.AtlasMainWindow.SetPosition(7, 30) self.tooltipInfo.SetParent(self.board) self.infoGuildMark.SetParent(self.board) self.SetPosition(wndMgr.GetScreenWidth() - 136 - 256 - 10, 0) self.Hide() miniMap.RegisterAtlasWindow(self)
def Open(self): #print "OPEN EMPIRE WINDOW ----------------------------------------------------------------------------" self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("SelectEmpireWindow") self.Show() if not self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "New_SelectEmpireWindow.py"): dbg.TraceError("SelectEmpireWindow.Open - __LoadScript Error") return self.OnSelectEmpire(self.empireID) self.__CreateButtons() self.__CreateDescriptionBox() app.ShowCursor() if musicInfo.selectMusic != "": snd.SetMusicVolume(systemSetting.GetMusicVolume()) snd.FadeInMusic("BGM/" + musicInfo.selectMusic) self.toolTip = uiToolTip.ToolTip() self.toolTip.ClearToolTip() self.ShowToolTip = False
def __init__(self, skin, idx): ui.ScriptWindow.__init__(self) self.SetWindowName("quest dialog") self.focusIndex = 0 self.board = None self.sx = 0 self.sy = 0 self.skin = skin if skin == 3: event.SetRestrictedCount(idx, 36) else: event.SetRestrictedCount(idx, 60) QuestCurtain.BarHeight = (wndMgr.GetScreenHeight() - wndMgr.GetScreenWidth() * 9 / 16) / 2 if QuestCurtain.BarHeight < 0: QuestCurtain.BarHeight = 50 if not ('QuestCurtain' in QuestDialog.__dict__): QuestDialog.QuestCurtain = QuestCurtain() QuestDialog.QuestCurtain.Show() QuestDialog.QuestCurtain.CurtainMode = 1 self.nextCurtainMode = 0 if self.skin: QuestDialog.QuestCurtain.CurtainMode = 1 self.nextCurtainMode = 0 self.LoadDialog(self.skin) else: QuestDialog.QuestCurtain.CurtainMode = -1 self.nextCurtainMode = -1 self.descIndex = idx self.descWindow = DescriptionWindow(idx) self.descWindow.Show() self.eventCurtain = EventCurtain(idx) event.SetEventHandler(idx, self) self.OnCloseEvent = None self.btnAnswer = None self.btnNext = None self.imgLeft = None self.imgTop = None self.imgBackground = None self.imgTitle = None self.titleState = self.TITLE_STATE_NONE self.titleShowTime = 0 self.images = [] self.prevbutton = None self.nextbutton = None # QUEST_INPUT self.needInputString = False self.editSlot = None self.editLine = None
def __init__(self): ui.Window.__init__(self,"TOP_MOST") self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetPosition(0,0) self.Hide() self.Index = 0 self.SendToServer = 0 self.Loaded = 0
def __MakeWindow(self): self.SetSize(295, 200) self.SetPosition((wndMgr.GetScreenWidth() / 2) - int(math.floor(self.GetWidth()) / 2), (wndMgr.GetScreenHeight() / 2) - int(math.floor(self.GetHeight() / 2))) self.AddFlag("movable") self.Show()
def Refresh(self, new_size = FALSE): self.desc.SetText(localeInfo.MAINTENANCE_DESCRIPTION % (localeInfo.SecondToDHMS(max(0, int(self.timeEnd - app.GetTime()))), localeInfo.SecondToDHMS(self.duration))) if new_size == TRUE or self.desc.GetWidth() + 30 > self.GetWidth(): self.SetSize(self.desc.GetWidth() + 30, self.GetHeight()) self.board.SetSize(self.GetWidth(), self.GetHeight()) self.SetPosition((wndMgr.GetScreenWidth() - self.GetWidth()) / 2, 75) self.desc.UpdateRect()
def __CreateTextBar(self): x, y = self.GetGlobalPosition() self.textBar = TextBar(370, 300) self.textBar.SetParent(self) self.textBar.SetPosition(3, 5) self.textBar.SetClipRect(0, y, wndMgr.GetScreenWidth(), y + 18) self.textBar.Show()
def Open(self): self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("SelectLogoWindow") self.Show() self.LoadNextVideo() app.ShowCursor() print "OPEN LOGO WINDOW ----------------------------------------------------------------------------"
def SetEmpire(self, empire_id): self.empireName.SetText(self.EMPIRE_NAME.get(empire_id, "")) rgb = self.EMPIRE_NAME_COLOR[empire_id] self.empireName.SetFontColor(rgb[0], rgb[1], rgb[2]) if empire_id != net.EMPIRE_A : self.flag.LoadImage(self.flagDict[empire_id]) self.flag.SetScale(0.45, 0.45) self.backGround.LoadImage(self.backGroundDict[empire_id]) self.backGround.SetScale(float(wndMgr.GetScreenWidth()) / 1024.0, float(wndMgr.GetScreenHeight()) / 768.0)
def SendAchievement(self, stringTypeInteger, achievementVnum, achievementPointThisInteger, achievementCountInteger, achievementPointNewInteger): if self.isLoaded == 0: achievementNameString = self.GetAchievementNameByVnum( achievementVnum) if stringTypeInteger == 1: # Kill self.AchievementActivityInfo.SetText( localeInfo.ACHIEVEMENT_KILL % (achievementNameString)) elif stringTypeInteger == 2: # Dungeon self.AchievementActivityInfo.SetText( localeInfo.ACHIEVEMENT_DUNGEON % (achievementNameString)) elif stringTypeInteger == 3: # Destroy self.AchievementActivityInfo.SetText( localeInfo.ACHIEVEMENT_DESTROY % (achievementNameString)) elif stringTypeInteger == 4: # Reach self.AchievementActivityInfo.SetText( localeInfo.ACHIEVEMENT_REACH % (achievementNameString)) self.AchievementPointMainInfo.SetText( localeInfo.ACHIEVEMENT_POINT_INFO % (achievementPointThisInteger)) self.AchievementCountInfo.SetText( localeInfo.ACHIEVEMENT_COUNT % (constInfo.NumberToPointString(achievementCountInteger))) self.AchievementPointInfo.SetText( localeInfo.ACHIEVEMENT_POINT % (constInfo.NumberToPointString(achievementPointNewInteger))) self.Show() self.pos_width = wndMgr.GetScreenWidth() + 50 self.SetPosition(wndMgr.GetScreenWidth() + 50, wndMgr.GetScreenHeight() - 150) self.isLoaded = 1 else: achievementNameString = self.GetAchievementNameByVnum( achievementVnum) chat.AppendChat( chat.CHAT_TYPE_INFO, "Du hast " + str(achievementNameString) + " besiegt! Du erhälst " + str(achievementPointThisInteger) + " Achievementpoints. (Gesamt: " + str(achievementPointNewInteger) + ", Count: " + str(achievementCountInteger) + ")")
def __MakeWindow(self): ServerStateChecker.Create(self) self.SetSize(150, 175) self.SetPosition((wndMgr.GetScreenWidth() / 2) - int(math.floor(self.GetWidth() / 2.)), (wndMgr.GetScreenHeight() / 2) - int(math.floor(self.GetHeight() / 2.))) self.AddFlag("movable") self.AddFlag("float") self.Show()
def __init__(self): ui.Window.__init__(self) self.SetSize(27,27) self.SetPosition(wndMgr.GetScreenWidth() - 149,58) self.dungeonGuideWindow = DungeonGuideWindow() self.dungeonGuideWindow.Close() self.dungeonCoolDownWindow = DungeonCooldownToolTip(self, self.dungeonGuideWindow) self.MakeButton() self.Show()
def __init__(self): ui.Window.__init__(self, "TOP_MOST") self.SetSize(336, 100) self.SetPosition(wndMgr.GetScreenWidth() + 50, wndMgr.GetScreenHeight() - 150) self.Hide() self.Loaded = 0 self.isLoaded = 0 self.pos_width = 0 self.delay = 0 self.initData()
def __CreateTextBar(self): x, y = self.GetGlobalPosition() self.textBar = BigTextBar(self.LINE_WIDTH, 300, self.FONT_HEIGHT) self.textBar.SetParent(self) self.textBar.SetPosition(6, 8) self.textBar.SetTextColor(242, 231, 193) self.textBar.SetClipRect(0, y + 8, wndMgr.GetScreenWidth(), y + 8 + self.STEP_HEIGHT) self.textBar.Show()
def __init__(self,layer="TOP_MOST"): ui.Window.__init__(self,layer) self.TopBar = ui.Bar("TOP_MOST") self.BottomBar = ui.Bar("TOP_MOST") self.TopBar.Show() self.BottomBar.Show() self.TopBar.SetColor(0xff000000) self.BottomBar.SetColor(0xff000000) self.TopBar.SetPosition(0,-self.BarHeight) self.TopBar.SetSize(wndMgr.GetScreenWidth(),self.BarHeight) self.BottomBar.SetPosition(0,wndMgr.GetScreenHeight()) self.BottomBar.SetSize(wndMgr.GetScreenWidth(),self.BarHeight) self.CurtainMode = 0 self.lastclock = time.clock()
def __init__(self): ui.Window.__init__(self, "TOP_MOST") self.SetSize(300, 72) self.SetPosition(wndMgr.GetScreenWidth() / 2 - 150 + 60 + 50, wndMgr.GetScreenHeight() + 150) self.Hide() self.Loaded = 0 self.isLoaded = 0 self.pos_height = 0 self.delay = 0 self.index = 0 self.initData()
def Open(self): print "OPEN LOADING WINDOW -------------------------------------------------------------------------------" try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile( self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoadingWindow.py") except: import exception exception.Abort("LodingWindow.Open - LoadScriptFile Error") try: self.loadingImage = self.GetChild("BackGround") self.errMsg = self.GetChild("ErrorMessage") self.loadingGage = self.GetChild("FullGage") except: import exception exception.Abort("LodingWindow.Open - LoadScriptFile Error") self.errMsg.Hide() imgFileNameDict = { 0: uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading0.sub", 1: uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading1.sub", 2: uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading2.sub", 3: uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading3.sub", } try: imgFileName = imgFileNameDict[app.GetRandom( 0, len(imgFileNameDict) - 1)] self.loadingImage.LoadImage(imgFileName) except: print "LoadingWindow.Open.LoadImage - %s File Load Error" % ( imgFileName) self.loadingImage.Hide() width = float(wndMgr.GetScreenWidth()) / float( self.loadingImage.GetWidth()) height = float(wndMgr.GetScreenHeight()) / float( self.loadingImage.GetHeight()) self.loadingImage.SetScale(width, height) self.loadingGage.SetPercentage(2, 100) self.Show() chrSlot = self.stream.GetCharacterSlot() net.SendSelectCharacterPacket(chrSlot) app.SetFrameSkip(0)
def __MakeChatWindow(self): wndChat = uiChat.ChatWindow() wndChat.SetSize(wndChat.CHAT_WINDOW_WIDTH, 0) wndChat.SetPosition(wndMgr.GetScreenWidth()/2 - wndChat.CHAT_WINDOW_WIDTH/2, wndMgr.GetScreenHeight() - wndChat.EDIT_LINE_HEIGHT - 37) wndChat.SetHeight(200) wndChat.Refresh() wndChat.Show() self.wndChat = wndChat self.wndChat.BindInterface(self) self.wndChat.SetSendWhisperEvent(ui.__mem_func__(self.OpenWhisperDialogWithoutTarget)) self.wndChat.SetOpenChatLogEvent(ui.__mem_func__(self.ToggleChatLogWindow))
def __init__(self, index): print "NEW EVENT CURTAIN ----------------------------------------------------------------------------" ui.Bar.__init__(self, "CURTAIN") self.SetWindowName("EventCurtain") self.AddFlag("float") self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.Hide() self.fadeColor = 1.0 self.curAlpha = 0.0 self.FadeInFlag = False self.state = self.STATE_WAIT self.speed = 1.0 self.eventIndex = index
def Open(self): self.loginFailureMsgDict={ "ALREADY" : localeInfo.LOGIN_FAILURE_ALREAY, "NOID" : localeInfo.LOGIN_FAILURE_NOT_EXIST_ID, "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "FULL" : localeInfo.LOGIN_FAILURE_TOO_MANY_USER, "SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN, "REPAIR" : localeInfo.LOGIN_FAILURE_REPAIR_ID, "BLOCK" : localeInfo.LOGIN_FAILURE_BLOCK_ID, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, "BESAMEKEY" : localeInfo.LOGIN_FAILURE_BE_SAME_KEY, "NOTAVAIL" : localeInfo.LOGIN_FAILURE_NOT_AVAIL, "NOBILL" : localeInfo.LOGIN_FAILURE_NOBILL, "BLKLOGIN" : localeInfo.LOGIN_FAILURE_BLOCK_LOGIN, "WEBBLK" : localeInfo.LOGIN_FAILURE_WEB_BLOCK, } self.loginFailureFuncDict = { "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : app.Exit, } self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("LoginWindow") self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoginWindow.py") if musicInfo.loginMusic != "": snd.SetMusicVolume(systemSetting.GetMusicVolume()) snd.FadeInMusic("BGM/" + musicInfo.loginMusic) snd.SetSoundVolume(systemSetting.GetSoundVolume()) ime.AddExceptKey(91) ime.AddExceptKey(93) self.SetChannel("CH1") self.idEditLine.SetFocus() self.pressKey() for aID in xrange(0, 4): if get_reg("%d_id" % aID): self.accountText[aID].SetText("%s" % binascii.a2b_base64("%s" % get_reg("%d_id" % aID))) self.Show() app.ShowCursor()
def Open(self): print "OPEN EMPIRE WINDOW ----------------------------------------------------------------------------" self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("SelectEmpireWindow") self.Show() if not self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "SelectEmpireWindow.py"): dbg.TraceError("SelectEmpireWindow.Open - __LoadScript Error") return self.OnSelectEmpire(self.empireID) self.__CreateButtons() self.__CreateDescriptionBox() app.ShowCursor()