def establishSave_func(oldPanel): inputS = [] savePage = savePageIndex() showSaveValue = savePage[0] lastSavePageValue = savePage[1] SaveHandleFramePanel.establishSaveInfoHeadPanel() flowReturn = SaveHandleFramePanel.seeSaveListPanel(showSaveValue, lastSavePageValue) inputS = inputS + flowReturn startId = len(inputS) flowReturn = SaveHandleFramePanel.askForChangeSavePagePanel(startId) inputS = inputS + flowReturn yrn = GameInit.askfor_Int(inputS) PyCmd.clr_cmd() if yrn == str(startId): savePanelPage = int(CacheContorl.panelState['SeeSaveListPanel']) if savePanelPage == 0: CacheContorl.panelState[ 'SeeSaveListPanel'] = CacheContorl.maxSavePage else: CacheContorl.panelState['SeeSaveListPanel'] = savePanelPage - 1 establishSave_func(oldPanel) elif yrn == str(startId + 1): if oldPanel == 'MainFramePanel': CacheContorl.panelState['SeeSaveListPanel'] = 0 import script.Flow.Main as mainframe mainframe.mainFrame_func() else: pass elif yrn == str(startId + 2): savePanelPage = int(CacheContorl.panelState['SeeSaveListPanel']) if savePanelPage == CacheContorl.maxSavePage: CacheContorl.panelState['SeeSaveListPanel'] = 0 else: CacheContorl.panelState['SeeSaveListPanel'] = savePanelPage + 1 establishSave_func(oldPanel) else: ansReturn = int(yrn) saveId = SaveHandle.getSavePageSaveId(showSaveValue, ansReturn) if SaveHandle.judgeSaveFileExist(saveId) == '1': askForOverlaySave_func(oldPanel, saveId) else: SaveHandle.establishSave(saveId) establishSave_func(oldPanel)
def establishSave_func(): ''' 绘制保存存档界面流程 ''' while (True): inputS = [] savePage = savePageIndex() showSaveValue = savePage[0] lastSavePageValue = savePage[1] SaveHandleFramePanel.establishSaveInfoHeadPanel() flowReturn = SaveHandleFramePanel.seeSaveListPanel( showSaveValue, lastSavePageValue) inputS = inputS + flowReturn startId = len(inputS) flowReturn = SaveHandleFramePanel.askForChangeSavePagePanel(startId) inputS = inputS + flowReturn yrn = GameInit.askfor_Int(inputS) PyCmd.clr_cmd() if yrn == str(startId): savePanelPage = int(CacheContorl.panelState['SeeSaveListPanel']) if savePanelPage == 0: CacheContorl.panelState[ 'SeeSaveListPanel'] = CacheContorl.maxSavePage else: CacheContorl.panelState['SeeSaveListPanel'] = savePanelPage - 1 elif yrn == str(startId + 1): CacheContorl.panelState['SeeSaveListPanel'] = 0 CacheContorl.nowFlowId = CacheContorl.oldFlowId break elif yrn == str(startId + 2): savePanelPage = int(CacheContorl.panelState['SeeSaveListPanel']) if savePanelPage == CacheContorl.maxSavePage: CacheContorl.panelState['SeeSaveListPanel'] = 0 else: CacheContorl.panelState['SeeSaveListPanel'] = savePanelPage + 1 else: ansReturn = int(yrn) saveId = SaveHandle.getSavePageSaveId(showSaveValue, ansReturn) if SaveHandle.judgeSaveFileExist(saveId) == '1': askForOverlaySave_func(saveId) else: SaveHandle.establishSave(saveId)