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)
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))
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)
def __onTriggerActivated(self, event): if event.settingsID == TUTORIAL_TRIGGER_TYPES.CLICK_TYPE and event.targetID: self.onHintClicked(ClickEvent(event.targetID))
def gc_proxyMouseClick(self, targetID): self.onGUIInput(ClickEvent(targetID))