Ejemplo n.º 1
0
	def __init__(self, axis, speed=None):
		HapticEnabledAction.__init__(self, axis, *strip_none(speed))
		self.mouse_axis = axis
		if speed:
			self.speed = (speed, speed)
		else:
			self.speed = (1.0, 1.0)
Ejemplo n.º 2
0
	def __init__(self, menu_id, confirm_with=None, cancel_with=None, show_with_release=None):
		Action.__init__(self, menu_id, *strip_none(confirm_with, cancel_with, show_with_release))
		self.menu_id = menu_id
		self.confirm_with = confirm_with or self.DEFAULT_CONFIRM
		self.cancel_with = cancel_with or self.DEFAULT_CANCEL
		self.show_with_release = show_with_release not in (None, False)
		self._stick_distance = 0
Ejemplo n.º 3
0
	def __init__(self, x=None, y=None):
		HapticEnabledAction.__init__(self, *strip_none(x, y))
		self.x = x or NoAction()
		self.y = y or NoAction()
		self.actions = (self.x, self.y)
		self._old_distance = 0
		self._travelled = 0
Ejemplo n.º 4
0
 def __init__(self, axis, speed=None):
     Action.__init__(self, axis, *strip_none(speed))
     HapticEnabledAction.__init__(self)
     self.mouse_axis = axis
     if speed:
         self.speed = (speed, speed)
     else:
         self.speed = (1.0, 1.0)
Ejemplo n.º 5
0
 def __init__(self, x=None, y=None):
     Action.__init__(self, *strip_none(x, y))
     HapticEnabledAction.__init__(self)
     self.x = x or NoAction()
     self.y = y or NoAction()
     self.actions = (self.x, self.y)
     self._old_distance = 0
     self._travelled = 0
Ejemplo n.º 6
0
	def __init__(self, button1, button2 = None, minustrigger = None, plustrigger = None):
		Action.__init__(self, button1, *strip_none(button2, minustrigger, plustrigger))
		HapticEnabledAction.__init__(self)
		self.button = button1 or None
		self.button2 = button2 or None
		self.minustrigger = minustrigger
		self.plustrigger = plustrigger
		self._pressed_key = None
		self._released = True
Ejemplo n.º 7
0
	def __init__(self, button1, button2 = None, minustrigger = None, plustrigger = None):
		Action.__init__(self, button1, *strip_none(button2, minustrigger, plustrigger))
		HapticEnabledAction.__init__(self)
		self.button = button1 or None
		self.button2 = button2 or None
		# minustrigger and plustrigger are not used anymore, __init__ takes
		# them only for backwards compatibility.
		# TODO: Remove backwards compatibility
		self._pressed_key = None
		self._released = True
Ejemplo n.º 8
0
	def __init__(self, axis=None, speed=None):
		Action.__init__(self, *strip_none(axis, speed))
		HapticEnabledAction.__init__(self)
		self._mouse_axis = axis or None
		self._old_pos = None
		self._travelled = 0
		if speed:
			self.speed = (speed, speed)
		else:
			self.speed = (1.0, 1.0)
Ejemplo n.º 9
0
	def __init__(self, x=None, y=None):
		Action.__init__(self, *strip_none(x, y))
		HapticEnabledAction.__init__(self)
		self.x = x or NoAction()
		self.y = y or NoAction()
		self.actions = (self.x, self.y)
		self._old_distance = 0
		self._travelled = 0
		if hasattr(self.x, "change") or hasattr(self.y, "change"):
			self.change = self._change
Ejemplo n.º 10
0
	def __init__(self, id, min = None, max = None):
		Action.__init__(self, id, *strip_none(min, max))
		self.id = id
		self._old_pos = 0
		if self.id in TRIGGERS:
			self.min = TRIGGER_MIN if min is None else min
			self.max = TRIGGER_MAX if max is None else max
		else:
			self.min = STICK_PAD_MIN if min is None else min
			self.max = STICK_PAD_MAX if max is None else max
Ejemplo n.º 11
0
	def __init__(self, axis=None, speed=None):
		Action.__init__(self, *strip_none(axis, speed))
		HapticEnabledAction.__init__(self)
		self._mouse_axis = axis
		self._old_pos = None
		self._travelled = 0
		if speed:
			self.speed = (speed, speed)
		else:
			self.speed = (1.0, 1.0)
Ejemplo n.º 12
0
	def __init__(self, x=None, y=None):
		Action.__init__(self, *strip_none(x, y))
		HapticEnabledAction.__init__(self)
		self.x = x or NoAction()
		self.y = y or NoAction()
		self.actions = (self.x, self.y)
		self._old_distance = 0
		self._travelled = 0
		if hasattr(self.x, "change") or hasattr(self.y, "change"):
			self.change = self._change
Ejemplo n.º 13
0
	def __init__(self, id, min = None, max = None):
		Action.__init__(self, id, *strip_none(min, max))
		self.id = id
		self.speed = 1.0
		self._old_pos = 0
		if self.id in TRIGGERS:
			self.min = TRIGGER_MIN if min is None else min
			self.max = TRIGGER_MAX if max is None else max
		else:
			self.min = STICK_PAD_MIN if min is None else min
			self.max = STICK_PAD_MAX if max is None else max
Ejemplo n.º 14
0
 def __init__(self,
              menu_id,
              confirm_with=None,
              cancel_with=None,
              show_with_release=None):
     Action.__init__(
         self, menu_id,
         *strip_none(confirm_with, cancel_with, show_with_release))
     self.menu_id = menu_id
     self.confirm_with = confirm_with or self.DEFAULT_CONFIRM
     self.cancel_with = cancel_with or self.DEFAULT_CANCEL
     self.show_with_release = show_with_release not in (None, False)
Ejemplo n.º 15
0
 def __init__(self,
              button1,
              button2=None,
              minustrigger=None,
              plustrigger=None):
     if button1 is None:
         button1, button2 = button2, None
     Action.__init__(self, button1,
                     *strip_none(button2, minustrigger, plustrigger))
     HapticEnabledAction.__init__(self)
     self.button = button1 or None
     self.button2 = button2 or None
     self.minustrigger = minustrigger
     self.plustrigger = plustrigger
     self._pressed_key = None
     self._released = True
Ejemplo n.º 16
0
	def __init__(self, axis1, axis2=None, axis3=None):
		Action.__init__(self, axis1, *strip_none(axis2, axis3))
		self.axes = [ axis1, axis2, axis3 ]
		self.speed = (1.0, 1.0, 1.0)
Ejemplo n.º 17
0
	def __init__(self, axis1, axis2=None, axis3=None):
		Action.__init__(self, axis1, *strip_none(axis2, axis3))
		self.axes = [ axis1, axis2, axis3 ]
		self.speed = (1.0, 1.0, 1.0)