def detachCursor(self, isDetached, enableAiming): if not self.__isStarted: return self.__detachCount += -1 if isDetached else 1 assert self.__detachCount <= 0 if self.__detachCount == -1 and isDetached: self.__targeting.enable(False) g_cursorDelegator.activateCursor() if enableAiming: self.setAimingMode(False, AIMING_MODE.USER_DISABLED) elif not self.__detachCount: self.__targeting.enable(True) g_cursorDelegator.detachCursor()
def detachCursor(self, isDetached, enableAiming): if not self.__isStarted: return self.__detachCount += -1 if isDetached else 1 assert self.__detachCount <= 0 if self.__detachCount == -1 and isDetached: self.__targeting.enable(False) g_cursorDelegator.activateCursor() if enableAiming: self.setAimingMode(False, AIMING_MODE.USER_DISABLED) elif not self.__detachCount: self.__targeting.enable(True) g_cursorDelegator.detachCursor()
def attachCursor(self, flags=0): return g_cursorDelegator.activateCursor()
def attachCursor(self): return g_cursorDelegator.activateCursor()