当前位置: 首页>>代码示例>>Python>>正文


Python Dialogs.hideLoadingSplashScreen方法代码示例

本文整理汇总了Python中fofix.game.Dialogs.hideLoadingSplashScreen方法的典型用法代码示例。如果您正苦于以下问题:Python Dialogs.hideLoadingSplashScreen方法的具体用法?Python Dialogs.hideLoadingSplashScreen怎么用?Python Dialogs.hideLoadingSplashScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fofix.game.Dialogs的用法示例。


在下文中一共展示了Dialogs.hideLoadingSplashScreen方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: resetWorld

# 需要导入模块: from fofix.game import Dialogs [as 别名]
# 或者: from fofix.game.Dialogs import hideLoadingSplashScreen [as 别名]
 def resetWorld(self):
     if self.scene:
         self.engine.view.popLayer(self.scene)
         self.engine.removeTask(self.scene)
     for layer in self.engine.view.layers:
         if isinstance(layer, Dialogs.LoadingSplashScreen):
             Dialogs.hideLoadingSplashScreen(self.engine, layer)
     self.scene = None
     self.sceneName = ""
     self.players = []
     self.songQueue.reset()
     self.engine.mainMenu.restartGame()
开发者ID:ME7ROPOLIS,项目名称:fofix,代码行数:14,代码来源:World.py

示例2: finishGame

# 需要导入模块: from fofix.game import Dialogs [as 别名]
# 或者: from fofix.game.Dialogs import hideLoadingSplashScreen [as 别名]
 def finishGame(self):
     if self.done:
         return
     self.players = []
     if self.scene:
         self.engine.view.popLayer(self.scene)
         self.engine.removeTask(self.scene)
     for layer in self.engine.view.layers:
         if isinstance(layer, Dialogs.LoadingSplashScreen):
             Dialogs.hideLoadingSplashScreen(self.engine, layer)
     self.scene   = None
     self.done    = True
     self.engine.finishGame()
开发者ID:ME7ROPOLIS,项目名称:fofix,代码行数:15,代码来源:World.py

示例3: restartGame

# 需要导入模块: from fofix.game import Dialogs [as 别名]
# 或者: from fofix.game.Dialogs import hideLoadingSplashScreen [as 别名]
 def restartGame(self):
     splash = Dialogs.showLoadingSplashScreen(self.engine, "")
     self.engine.view.pushLayer(Lobby(self.engine))
     Dialogs.hideLoadingSplashScreen(self.engine, splash)
开发者ID:arielenter,项目名称:fofix,代码行数:6,代码来源:MainMenu.py

示例4: __init__

# 需要导入模块: from fofix.game import Dialogs [as 别名]
# 或者: from fofix.game.Dialogs import hideLoadingSplashScreen [as 别名]

#.........这里部分代码省略.........
        self.items      = []
        self.cmdPlay    = False
        self.queued     = True

        self.loadStartTime = time.time()

        if self.tut == True:
            self.library = self.engine.tutorialFolder
        else:
            self.library    = os.path.join(self.engine.config.get("setlist", "base_library"), self.libraryName)
            if not os.path.isdir(self.engine.resource.fileName(self.library)):
                self.library = self.engine.resource.fileName(os.path.join(self.engine.config.get("setlist", "base_library"), song.DEFAULT_LIBRARY))

        self.searchText = ""

        #user configurables and input management
        self.listingMode       = 0     #with libraries or List All
        self.preloadSongLabels = False
        self.showCareerTiers   = 1+(self.careerMode and 1 or 0) #0-Never; 1-Career Only; 2-Always
        self.scrolling        = 0
        self.scrollDelay      = self.engine.config.get("game", "scroll_delay")
        self.scrollRate       = self.engine.config.get("game", "scroll_rate")
        self.scrollTime       = 0
        self.scroller         = [lambda: None, self.scrollUp, self.scrollDown]
        self.scoreDifficulty  = song.difficulties[self.engine.config.get("game", "songlist_difficulty")]
        self.scorePart        = song.parts[self.engine.config.get("game", "songlist_instrument")]
        self.sortOrder        = self.engine.config.get("game", "sort_order")
        self.queueFormat      = self.engine.config.get("game", "queue_format")
        self.queueOrder       = self.engine.config.get("game", "queue_order")
        self.queueParts       = self.engine.config.get("game", "queue_parts")
        self.queueDiffs       = self.engine.config.get("game", "queue_diff")
        self.nilShowNextScore = self.engine.config.get("songlist",  "nil_show_next_score")

        #theme information
        self.themename = self.engine.data.themeLabel
        self.theme = self.engine.data.theme

        #theme configurables
        self.setlistStyle      = self.engine.theme.setlist.setlistStyle    #0 = Normal; 1 = List; 2 = Circular
        self.headerSkip        = self.engine.theme.setlist.headerSkip      #items taken up by header (non-static only)
        self.footerSkip        = self.engine.theme.setlist.footerSkip      #items taken up by footer (non-static only)
        self.itemSize          = self.engine.theme.setlist.itemSize        #delta (X, Y) (0..1) for each item (non-static only)
        self.labelType         = self.engine.theme.setlist.labelType       #Album covers (0) or CD labels (1)
        self.labelDistance     = self.engine.theme.setlist.labelDistance   #number of labels away to preload
        self.showMoreLabels    = self.engine.theme.setlist.showMoreLabels  #whether or not additional unselected labels are rendered on-screen
        self.texturedLabels    = self.engine.theme.setlist.texturedLabels  #render the art as a texture?
        self.itemsPerPage      = self.engine.theme.setlist.itemsPerPage    #number of items to show on screen
        self.followItemPos     = (self.itemsPerPage+1)/2
        self.showLockedSongs   = self.engine.theme.setlist.showLockedSongs #whether or not to even show locked songs
        self.showSortTiers     = self.engine.theme.setlist.showSortTiers   #whether or not to show sorting tiers - career tiers take precedence.
        self.selectTiers       = self.engine.theme.setlist.selectTiers     #whether or not tiers should be selectable as a quick setlist.

        if self.engine.cmdPlay == 2:
            self.songName = Config.get("setlist", "selected_song")
            self.libraryName = Config.get("setlist", "selected_library")
            self.cmdPlay = self.checkCmdPlay()
            if self.cmdPlay:
                Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
                return
        elif len(self.engine.world.songQueue) > 0:
            Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
            return

        #variables for setlist management (Not that this is necessary here - just to see what exists.)
        self.songLoader       = None #preview handling
        self.tiersPresent     = False
        self.startingSelected = self.songName
        self.selectedIndex    = 0
        self.selectedItem     = None
        self.selectedOffset   = 0.0
        self.previewDelay     = 1000
        self.previewLoaded    = False
        self.itemRenderAngles = [0.0]
        self.itemLabels       = [None]
        self.xPos             = 0
        self.yPos             = 0
        self.pos              = 0

        self.infoPage         = 0

        self.menu_force_reload   = False
        self.menu_text_color     = (1, 1, 1)
        self.menu_selected_color = (.66, .66, 0)
        self.menu_text_pos       = (.2, .31)
        self.menu = Menu(self.engine, [ConfigChoice(self.engine, self.engine.config, "game", "queue_format", autoApply = True),
                                       ConfigChoice(self.engine, self.engine.config, "game", "queue_order", autoApply = True),
                                       ConfigChoice(self.engine, self.engine.config, "game", "queue_parts", autoApply = True),
                                       ConfigChoice(self.engine, self.engine.config, "game", "queue_diff", autoApply = True),
                                       ActiveConfigChoice(self.engine, self.engine.config, "game", "sort_order", onChange = self.forceReload),
                                       ActiveConfigChoice(self.engine, self.engine.config, "game", "sort_direction", onChange = self.forceReload),
                                       ActiveConfigChoice(self.engine, self.engine.config, "game", "songlist_instrument", onChange = self.forceReload),
                                       ActiveConfigChoice(self.engine, self.engine.config, "game", "songlist_difficulty", onChange = self.forceReload),
                                       ], name = "setlist", fadeScreen = False, onClose = self.resetQueueVars, font = self.engine.data.pauseFont, \
                         pos = self.menu_text_pos, textColor = self.menu_text_color, selectedColor = self.menu_selected_color)

        #now, load the first library
        self.loadLibrary()

        #load the images
        self.loadImages()
开发者ID:ME7ROPOLIS,项目名称:fofix,代码行数:104,代码来源:SongChoosingScene.py

示例5: checkCmdPlay

# 需要导入模块: from fofix.game import Dialogs [as 别名]
# 或者: from fofix.game.Dialogs import hideLoadingSplashScreen [as 别名]
 def checkCmdPlay(self):
     info = song.loadSongInfo(self.engine, self.songName, library = self.libraryName)
     guitars = []
     drums = []
     vocals = []
     autoPart = None
     for part in info.parts:
         if part.id == 4 or part.id == 7:
             drums.append(part)
         elif part.id == 5:
             vocals.append(part)
         else:
             guitars.append(part)
         if self.engine.cmdPlay == 2 and self.engine.cmdPart is not None and len(self.playerList) == 1:
             if self.engine.cmdPart == part.id:
                 log.debug("Command-line mode: Part found!")
                 if part.id == 4 and self.engine.input.gameDrums > 0:
                     autoPart = part.id
                 elif part.id == 5 and self.engine.input.gameMics > 0:
                     autoPart = part.id
                 elif self.engine.input.gameGuitars > 0:
                     autoPart = part.id
     if autoPart is None:
         if len(drums) == 0 and self.engine.input.gameDrums > 0:
             if self.splash:
                 Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
                 self.splash = None
             Dialogs.showMessage(self.engine, _("There are no drum parts in this song. Change your controllers to play."))
             if self.engine.cmdPlay == 2:
                 self.engine.cmdPlay = 0
                 return False
         if len(guitars) == 0 and self.engine.input.gameGuitars > 0:
             if self.splash:
                 Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
                 self.splash = None
             Dialogs.showMessage(self.engine, _("There are no guitar parts in this song. Change your controllers to play."))
             if self.engine.cmdPlay == 2:
                 self.engine.cmdPlay = 0
                 return False
         if len(vocals) == 0 and self.engine.input.gameMics > 0:
             if self.splash:
                 Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
                 self.splash = None
             Dialogs.showMessage(self.engine, _("There are no vocal parts in this song. Change your controllers to play."))
             if self.engine.cmdPlay == 2:
                 self.engine.cmdPlay = 0
                 return False
     # Make sure the difficulty we chose is available
     p = self.playerList[0].part
     player = self.playerList[0]
     if self.engine.cmdDiff is not None:
         diff = song.difficulties[self.engine.cmdDiff]
         if diff in info.partDifficulties[p.id]:
             self.playerList[0].difficulty = diff
         else:
             self.playerList[0].difficulty = info.partDifficulties[p.id][0]
     else:
         if self.splash:
             Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
             self.splash = None
         self.playerList[0].difficulty = Dialogs.chooseItem(self.engine, info.partDifficulties[p.id],
                               "%s \n %s" % (song.removeSongOrderPrefixFromName(info.name), _("%s Choose a difficulty:") % player.name), selected = player.difficulty)
     return True
开发者ID:ME7ROPOLIS,项目名称:fofix,代码行数:65,代码来源:SongChoosingScene.py

示例6: prepareSetlist

# 需要导入模块: from fofix.game import Dialogs [as 别名]
# 或者: from fofix.game.Dialogs import hideLoadingSplashScreen [as 别名]
    def prepareSetlist(self, songs):
        if self.songLoader:
            self.songLoader.stop()
        msg = self.engine.setlistMsg
        self.engine.setlistMsg = None
        self.selectedIndex = 0
        if self.listingMode == 0 or self.careerMode:
            self.items = self.libraries + self.songs
        else:
            self.items = self.songs
        self.itemRenderAngles = [0.0]  * len(self.items)
        self.itemLabels       = [None] * len(self.items)
        self.searching        = False
        self.searchText       = ""

        shownItems = []
        for item in self.items: #remove things we don't want to see. Some redundancy, but that's okay.
            if isinstance(item, song.TitleInfo) or isinstance(item, song.SortTitleInfo):
                if self.showCareerTiers == 2:
                    if isinstance(item, song.TitleInfo):
                        if len(shownItems) > 0:
                            if isinstance(shownItems[-1], song.TitleInfo):
                                shownItems.pop()
                        shownItems.append(item)
                    elif isinstance(item, song.SortTitleInfo):
                        continue
                else:
                    if isinstance(item, song.TitleInfo):
                        continue
                    elif isinstance(item, song.SortTitleInfo):
                        if not self.showSortTiers:
                            continue
                        if len(shownItems) > 0:
                            if isinstance(shownItems[-1], song.SortTitleInfo):
                                shownItems.pop()
                        shownItems.append(item)
            elif isinstance(item, song.SongInfo):
                if self.careerMode and (not self.showLockedSongs) and item.getLocked():
                    continue
                else:
                    shownItems.append(item)
            else:
                shownItems.append(item)
        if len(shownItems) > 0:
            if isinstance(shownItems[-1], song.TitleInfo) or isinstance(shownItems[-1], song.SortTitleInfo):
                shownItems.pop()

        if len(self.items) > 0 and len(shownItems) == 0:
            msg = _("No songs in this setlist are available to play!")
            if self.careerMode:
                msg = msg + " " + _("Make sure you have a working career pack!")
            Dialogs.showMessage(self.engine, msg)
        elif len(shownItems) > 0:
            for item in shownItems:
                if isinstance(item, song.SongInfo) or isinstance(item, song.LibraryInfo):
                    self.items = shownItems #make sure at least one item is selectable
                    break
            else:
                msg = _("No songs in this setlist are available to play!")
                if self.careerMode:
                    msg = msg + " " + _("Make sure you have a working career pack!")
                Dialogs.showMessage(self.engine, msg)
                self.items = []

        if self.items == []:    #MFH: Catch when there ain't a damn thing in the current folder - back out!
            if self.library != song.DEFAULT_LIBRARY:
                Dialogs.hideLoadingSplashScreen(self.engine, self.splash)
                self.splash = None
                self.startingSelected = self.library
                self.library     = os.path.dirname(self.library)
                self.selectedItem = None
                self.loadLibrary()
                return

        log.debug("Setlist loaded.")

        self.loaded           = True

        if self.setlistStyle == 1:
            for i in range(self.headerSkip):
                self.items.insert(0, song.BlankSpaceInfo())
            for i in range(self.footerSkip):
                self.items.append(song.BlankSpaceInfo())

        if self.startingSelected is not None:
            for i, item in enumerate(self.items):
                if isinstance(item, song.SongInfo) and self.startingSelected == item.songName: #TODO: SongDB
                    self.selectedIndex =  i
                    break
                elif isinstance(item, song.LibraryInfo) and self.startingSelected == item.libraryName:
                    self.selectedIndex =  i
                    break

        for item in self.items:
            if isinstance(item, song.SongInfo):
                item.name = song.removeSongOrderPrefixFromName(item.name) #TODO: I don't like this.
            elif not self.tiersPresent and (isinstance(item, song.TitleInfo) or isinstance(item, song.SortTitleInfo)):
                self.tiersPresent = True

        while isinstance(self.items[self.selectedIndex], song.BlankSpaceInfo) or ((isinstance(self.items[self.selectedIndex], song.TitleInfo) or isinstance(self.items[self.selectedIndex], song.SortTitleInfo)) and not self.selectTiers):
#.........这里部分代码省略.........
开发者ID:ME7ROPOLIS,项目名称:fofix,代码行数:103,代码来源:SongChoosingScene.py


注:本文中的fofix.game.Dialogs.hideLoadingSplashScreen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。