def doLeaveAction(self, dispatcher, ctx = None): if ctx is not None: funcExit = ctx.getFuncExit() else: funcExit = FUNCTIONAL_EXIT.NO_FUNC meta = self.getConfirmDialogMeta(funcExit) if meta is not None: isConfirmed = yield DialogsInterface.showDialog(meta) else: isConfirmed = yield lambda callback: callback(True) if isConfirmed: if ctx is None: ctx = prb_ctx.LeavePrbCtx(waitingID='prebattle/leave') if dispatcher._setRequestCtx(ctx): self.leave(ctx)
def createLeaveCtx(self, flags=FUNCTIONAL_FLAG.UNDEFINED): return prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', flags=flags)
def closeTrainingRoom(self): result = yield self.prbDispatcher.leave(prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', flags=FUNCTIONAL_FLAG.SWITCH)) if not result: self.__showActionErrorMessage()
def requestToLeave(self): self.prbDispatcher.doLeaveAction( prb_ctx.LeavePrbCtx(waitingID='prebattle/leave'))
def requestToLeave(self): self.prbDispatcher.doLeaveAction( prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', funcExit=FUNCTIONAL_EXIT.INTRO_PREBATTLE))
def createLeaveCtx(self, funcExit=FUNCTIONAL_EXIT.NO_FUNC): return prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', funcExit=funcExit)
def requestToLeave(self): self.prbDispatcher.doLeaveAction( prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', flags=FUNCTIONAL_FLAG.SWITCH))
def closeTrainingRoom(self): result = yield self.prbDispatcher.leave( prb_ctx.LeavePrbCtx(waitingID='prebattle/leave', funcExit=FUNCTIONAL_EXIT.INTRO_PREBATTLE)) if not result: self.__showActionErrorMessage()