Example #1
0
 def refuseTraining(self):
     isOk = yield DialogsInterface.showI18nConfirmDialog('refuseTraining')
     if isOk:
         g_eventBus.handleEvent(events.TutorialEvent(
             events.TutorialEvent.STOP_TRAINING),
                                scope=EVENT_BUS_SCOPE.GLOBAL)
     self.destroy()
Example #2
0
 def __doLeaveTutorial(self):
     result = yield DialogsInterface.showDialog(
         I18nConfirmDialogMeta('refuseTraining',
                               focusedID=DIALOG_BUTTON_ID.CLOSE))
     if result:
         self.fireEvent(
             events.TutorialEvent(events.TutorialEvent.STOP_TRAINING))
         self.destroy()
Example #3
0
 def startOffbattleTutorial(self):
     self.__fireEvent(events.TutorialEvent(
         events.TutorialEvent.START_TRAINING,
         settingsID='OFFBATTLE',
         reloadIfRun=True,
         restoreIfRun=True,
         isStopForced=True),
                      scope=EVENT_BUS_SCOPE.GLOBAL)
 def _doSelect(self, dispatcher):
     result = yield dispatcher.unlock(FUNCTIONAL_EXIT.BATTLE_TUTORIAL, True)
     if result:
         g_eventBus.handleEvent(events.TutorialEvent(
             events.TutorialEvent.START_TRAINING,
             settingsID='OFFBATTLE',
             reloadIfRun=True,
             restoreIfRun=True),
                                scope=EVENT_BUS_SCOPE.GLOBAL)
Example #5
0
 def _triggerEvent(self, _, arenaUniqueID):
     g_eventBus.handleEvent(
         events.TutorialEvent(
             events.TutorialEvent.SHOW_TUTORIAL_BATTLE_HISTORY,
             targetID=arenaUniqueID))
Example #6
0
def runSalesChain(chapterID):
    g_eventBus.handleEvent(
        events.TutorialEvent(events.TutorialEvent.START_TRAINING,
                             settingsID='SALES_TRIGGERS',
                             initialChapter=chapterID,
                             restoreIfRun=True))
Example #7
0
def stopTutorial():
    g_eventBus.handleEvent(events.TutorialEvent(
        events.TutorialEvent.STOP_TRAINING),
                           scope=EVENT_BUS_SCOPE.GLOBAL)
Example #8
0
 def handleBodyButton(self):
     g_eventBus.handleEvent(
         events.TutorialEvent(events.TutorialEvent.SIMPLE_WINDOW_PROCESSED,
                              targetID=self.__content['chapterID']))
Example #9
0
 def handleCloseButton(self):
     g_eventBus.handleEvent(
         events.TutorialEvent(events.TutorialEvent.SIMPLE_WINDOW_CLOSED,
                              targetID=self.__content['chapterID']))
Example #10
0
 def refuse(self):
     g_eventBus.handleEvent(events.TutorialEvent(
         events.TutorialEvent.REFUSE),
                            scope=EVENT_BUS_SCOPE.GLOBAL)
Example #11
0
 def restart(self):
     g_eventBus.handleEvent(events.TutorialEvent(
         events.TutorialEvent.RESTART),
                            scope=EVENT_BUS_SCOPE.GLOBAL)
Example #12
0
 def _dispose(self):
     super(TutorialControl, self)._dispose()
     g_eventBus.handleEvent(events.TutorialEvent(
         events.TutorialEvent.UI_CONTROL_REMOVED),
                            scope=EVENT_BUS_SCOPE.GLOBAL)
Example #13
0
 def _populate(self):
     super(TutorialControl, self)._populate()
     g_eventBus.handleEvent(events.TutorialEvent(
         events.TutorialEvent.UI_CONTROL_ADDED),
                            scope=EVENT_BUS_SCOPE.GLOBAL)