コード例 #1
0
 def _onMouseClicked(self, targetKey):
     if targetKey in self._content:
         targetID = self._content[targetKey]
         if targetID:
             self._gui.onGUIInput(ClickEvent(targetID))
     else:
         LOG_ERROR('Target not found in data', targetKey)
コード例 #2
0
 def __onTriggerActivated(self, event):
     if event.settingsID == TUTORIAL_TRIGGER_TYPES.CLICK_TYPE and event.targetID:
         self.onHintClicked(ClickEvent(event.targetID))
     elif event.settingsID == TUTORIAL_TRIGGER_TYPES.CLICK_OUTSIDE_TYPE and event.targetID:
         self.onHintItemLost(event.targetID)
     elif event.settingsID == TUTORIAL_TRIGGER_TYPES.ENABLED_CHANGE and event.targetID:
         self.onEnabledChanged(EnabledChangeEvent(event.targetID, event.componentState))
     elif event.settingsID == TUTORIAL_TRIGGER_TYPES.VISIBLE_CHANGE and event.targetID:
         self.onVisibleChanged(VisibleChangeEvent(event.targetID, event.componentState))
コード例 #3
0
ファイル: proxy.py プロジェクト: jamesxia4/wot_client
 def __onTriggerActivated(self, event):
     if not event.targetID:
         LOG_ERROR('Key targetID is not defined in the event ON_TRIGGER_ACTIVATED')
         return
     if not event.settingsID:
         LOG_ERROR('Key settingsID is not defined in the event ON_TRIGGER_ACTIVATED')
         return
     triggerType = event.settingsID
     componentID = event.targetID
     if triggerType == TUTORIAL_TRIGGER_TYPES.CLICK_TYPE:
         LOG_DEBUG('Player has clicked', componentID)
         self.onGUIInput(ClickEvent(componentID))
     elif triggerType == TUTORIAL_TRIGGER_TYPES.CLICK_OUTSIDE_TYPE:
         LOG_DEBUG('Player has clicked outside', componentID)
         self.onGUIInput(ClickOutsideEvent(componentID))
     elif triggerType == TUTORIAL_TRIGGER_TYPES.ESCAPE:
         LOG_DEBUG('Player has pressed ESC', componentID)
         self.onGUIInput(EscEvent(componentID))
     else:
         LOG_ERROR('Type of event is not supported', triggerType)
コード例 #4
0
ファイル: hintsproxy.py プロジェクト: Difrex/wotsdk
 def __onTriggerActivated(self, event):
     if event.settingsID == TUTORIAL_TRIGGER_TYPES.CLICK_TYPE and event.targetID:
         self.onHintClicked(ClickEvent(event.targetID))
コード例 #5
0
 def gc_proxyMouseClick(self, targetID):
     self.onGUIInput(ClickEvent(targetID))