コード例 #1
0
ファイル: custom.py プロジェクト: wendeldr/sc-controller
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		try:
			txCustomAction = self.builder.get_object("txCustomAction")
			txCustomAction.set_monospace(True)
		except: pass
コード例 #2
0
ファイル: axis_action.py プロジェクト: soekul/sc-controller
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbAreaType = self.builder.get_object("cbAreaType")
		cbAreaType.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
		self.on_wayland = "WAYLAND_DISPLAY" in os.environ or not isinstance(Gdk.Display.get_default(), GdkX11.X11Display)
		if self.on_wayland:
			self.builder.get_object("lblArea").set_text(_("Note: Mouse Region option is not available with Wayland-based display server"))
			self.builder.get_object("grArea").set_sensitive(False)
		
		# Remove options that are not applicable to currently editted input
		if self.editor.get_id() in STICKS:
			# Remove "Mouse Region", "Trackball", "Trackpad"
			# and "Mouse (Emulate Stick)" options when editing stick bindings
			cb = self.builder.get_object("cbAxisOutput")
			for row in cb.get_model():
				if row[2] in ("wheel_pad", "area", "mouse_pad", "trackpad", "trackball"):
					cb.get_model().remove(row.iter)
		else:
			# Remove "Mouse" option when editing pads
			# (it's effectivelly same as Trackpad)
			cb = self.builder.get_object("cbAxisOutput")
			for row in cb.get_model():
				if row[2] in ("wheel_stick", "mouse_stick", ):
					cb.get_model().remove(row.iter)
コード例 #3
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     TimerManager.__init__(self)
     self._recursing = False
     self.relative_area = False
     self.osd_area_instance = None
     self.parser = GuiActionParser()
コード例 #4
0
ファイル: axis_action.py プロジェクト: kozec/sc-controller
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbAreaType = self.builder.get_object("cbAreaType")
		cbAreaType.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
		self.on_wayland = "WAYLAND_DISPLAY" in os.environ or not isinstance(Gdk.Display.get_default(), GdkX11.X11Display)
		if self.on_wayland:
			self.builder.get_object("lblArea").set_text(_("Note: Mouse Region option is not available with Wayland-based display server"))
			self.builder.get_object("grArea").set_sensitive(False)
		
		# Remove options that are not applicable to currently editted input
		if self.editor.get_id() in STICKS:
			# Remove "Mouse Region", "Mouse" and "Mouse (Emulate Stick)" options
			# when editing stick bindings
			cb = self.builder.get_object("cbAxisOutput")
			for row in cb.get_model():
				if row[2] in ("wheel_pad", "area", "mouse", "mouse_pad"):
					cb.get_model().remove(row.iter)
		else:
			# Remove "Mouse" option when editing pads
			# (it's effectivelly same as Trackpad)
			cb = self.builder.get_object("cbAxisOutput")
			for row in cb.get_model():
				if row[2] in ("wheel_stick", "mouse_stick"):
					cb.get_model().remove(row.iter)
コード例 #5
0
ファイル: buttons.py プロジェクト: kozec/sc-controller
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.setup_image()
			if self.app.osd_mode:
				self.builder.get_object('btnGrabKey').set_sensitive(False)
				self.builder.get_object('btnGrabAnother').set_sensitive(False)
コード例 #6
0
ファイル: trigger.py プロジェクト: kozec/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self.half = NoAction()
		self.full = NoAction()
		self.analog = NoAction()
コード例 #7
0
ファイル: axis_action.py プロジェクト: wendeldr/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		TimerManager.__init__(self)
		self._recursing = False
		self.relative_area = False
		self.osd_area_instance = None
		self.parser = GuiActionParser()
コード例 #8
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		ProfileManager.__init__(self)
		self._recursing = False
		self._profile_load_started = False
		self._current_profile = None
		self.parser = GuiActionParser()
コード例 #9
0
ファイル: dpad.py プロジェクト: kozec/sc-controller
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbConfirmWith = self.builder.get_object("cbConfirmWith")
		cbCancelWith = self.builder.get_object("cbCancelWith")
		cbConfirmWith.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
		cbCancelWith.set_row_separator_func( lambda model, iter : model.get_value(iter, 0)  == "-" )
コード例 #10
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     BindingEditor.__init__(self, app)
     self._recursing = False
     self.half = NoAction()
     self.full = NoAction()
     self.analog = NoAction()
コード例 #11
0
ファイル: dpad.py プロジェクト: wiltonlazary/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		MenuActionCofC.__init__(self)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self._userdata_load_started = False
		self.actions = [ NoAction() ] * 8
コード例 #12
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
     self._recursing = True
     cbGyroButton = self.builder.get_object("cbGyroButton")
     fill_buttons(cbGyroButton)
     self._recursing = False
コード例 #13
0
 def load(self):
     if not self.loaded:
         AEComponent.load(self)
         self.setup_image()
         if self.app.osd_mode:
             self.builder.get_object('btnGrabKey').set_sensitive(False)
             self.builder.get_object('btnGrabAnother').set_sensitive(False)
コード例 #14
0
ファイル: dpad.py プロジェクト: Micr0Bit/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		MenuActionCofC.__init__(self)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self._userdata_load_started = False
		self.actions = [ NoAction() ] * 8
コード例 #15
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbConfirmWith = self.builder.get_object("cbConfirmWith")
		cbCancelWith = self.builder.get_object("cbCancelWith")
		cbConfirmWith.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
		cbCancelWith.set_row_separator_func( lambda model, iter : model.get_value(iter, 0)  == "-" )
コード例 #16
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		self._recursing = True
		cbGyroButton = self.builder.get_object("cbGyroButton")
		fill_buttons(cbGyroButton)
		self._recursing = False
コード例 #17
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		UserDataManager.__init__(self)
		self._recursing = False
		self._userdata_load_started = False
		self._current_profile = None
		self._current_menu = None
		self.parser = GuiActionParser()
コード例 #18
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
     try:
         txCustomAction = self.builder.get_object("txCustomAction")
         txCustomAction.set_monospace(True)
     except:
         pass
コード例 #19
0
ファイル: axis_action.py プロジェクト: soekul/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		TimerManager.__init__(self)
		self._recursing = False
		self.relative_area = False
		self.osd_area_instance = None
		self.on_wayland = False
		self.circular = MouseAction(Rels.REL_WHEEL)
		self.parser = GuiActionParser()
コード例 #20
0
ファイル: gyro.py プロジェクト: Micr0Bit/sc-controller
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbGyroButton = self.builder.get_object("cbGyroButton")
		self._recursing = True
		cbGyroButton = self.builder.get_object("cbGyroButton")
		fill_buttons(cbGyroButton)
		self._recursing = False
		self.buttons = [ self.builder.get_object(x) for x in ("btPitch", "btYaw", "btRoll") ]
		self.cbs = [ self.builder.get_object(x) for x in ("cbPitchAbs", "cbYawAbs", "cbRollAbs") ]
		self.labels = [ self.builder.get_object(x) for x in ("lblPitch", "lblYaw", "lblRoll") ]
コード例 #21
0
ファイル: axis_action.py プロジェクト: kozec/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		TimerManager.__init__(self)
		self._recursing = False
		self.relative_area = False
		self.osd_area_instance = None
		self.on_wayland = False
		self.circular_axis = MouseAction(Rels.REL_WHEEL)
		self.circular_buttons = [ None, None ]
		self.button = None
		self.parser = GuiActionParser()
コード例 #22
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbGyroButton = self.builder.get_object("cbGyroButton")
		self._recursing = True
		cbGyroButton = self.builder.get_object("cbGyroButton")
		fill_buttons(cbGyroButton)
		self._recursing = False
		self.buttons = [ self.builder.get_object(x) for x in ("btPitch", "btYaw", "btRoll") ]
		self.cbs = [ self.builder.get_object(x) for x in ("cbPitchAbs", "cbYawAbs", "cbRollAbs") ]
		self.labels = [ self.builder.get_object(x) for x in ("lblPitch", "lblYaw", "lblRoll") ]
コード例 #23
0
ファイル: first_page.py プロジェクト: kozec/sc-controller
	def load(self):
		if AEComponent.load(self):
			markup = ""
			if self.editor.get_mode() == Action.AC_PAD:
				markup = MARKUP_PAD
			elif self.editor.get_mode() == Action.AC_STICK:
				markup = MARKUP_STICK
			elif self.editor.get_mode() == Action.AC_GYRO:
				markup = MARKUP_GYRO
			elif self.editor.get_mode() == Action.AC_TRIGGER:
				markup = MARKUP_TRIGGER
			else:
				markup = MARKUP_BUTTON
			
			long_names = {
				'LPAD' : _("Left Pad"),
				'RPAD' : _("Right Pad"),
				'LGRIP' : _("Left Grip"),
				'RGRIP' : _("Right Grip"),
				'LB' : _("Left Bumper"),
				'RB' : _("Right Bumper"),
				'LEFT' : _("Left Trigger"),
				'RIGHT' : _("Right Trigger"),
				'STICK' : _("Stick"),
			}
			
			markup = markup % {
				'what' : long_names.get(nameof(self.editor.get_id()),
								nameof(self.editor.get_id()).title())
			}
			self.builder.get_object("lblMarkup").set_markup(markup.strip(" \r\n\t"))
			return True
コード例 #24
0
    def load(self):
        if AEComponent.load(self):
            markup = ""
            if self.editor.get_mode() == Action.AC_PAD:
                markup = MARKUP_PAD
            elif self.editor.get_mode() == Action.AC_STICK:
                markup = MARKUP_STICK
            elif self.editor.get_mode() == Action.AC_GYRO:
                markup = MARKUP_GYRO
            elif self.editor.get_mode() == Action.AC_TRIGGER:
                markup = MARKUP_TRIGGER
            else:
                markup = MARKUP_BUTTON

            long_names = {
                'LPAD': _("Left Pad"),
                'RPAD': _("Right Pad"),
                'LGRIP': _("Left Grip"),
                'RGRIP': _("Right Grip"),
                'LB': _("Left Bumper"),
                'RB': _("Right Bumper"),
                'LEFT': _("Left Trigger"),
                'RIGHT': _("Right Trigger"),
                'STICK': _("Stick"),
            }

            markup = markup % {
                'what':
                long_names.get(nameof(self.editor.get_id()),
                               nameof(self.editor.get_id()).title())
            }
            self.builder.get_object("lblMarkup").set_markup(
                markup.strip(" \r\n\t"))
            return True
コード例 #25
0
ファイル: first_page.py プロジェクト: kozec/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
コード例 #26
0
ファイル: tilt.py プロジェクト: mulark/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self.actions = [ NoAction() ] * 4
コード例 #27
0
ファイル: menu_only.py プロジェクト: wendeldr/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		MenuActionCofC.__init__(self)
		self._userdata_load_started = False
		self._recursing = False
コード例 #28
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self.x = self.y = NoAction()
コード例 #29
0
ファイル: gyro.py プロジェクト: Micr0Bit/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self._recursing = False
		self.axes = [ None, None, None ]
コード例 #30
0
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.builder.get_object("lblClickAnyButton").set_visible(False)
コード例 #31
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
コード例 #32
0
ファイル: dpad.py プロジェクト: TotalCaesar659/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self.actions = [ NoAction() ] * 8
コード例 #33
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     MenuActionCofC.__init__(self)
     self._userdata_load_started = False
     self._recursing = False
コード例 #34
0
ファイル: buttons.py プロジェクト: wiltonlazary/sc-controller
 def load(self):
     if not self.loaded:
         AEComponent.load(self)
         self.setup_image()
コード例 #35
0
ファイル: buttons.py プロジェクト: kozec/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		Chooser.__init__(self, app)
		self.axes_allowed = True
		self.keys = set()
コード例 #36
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		Chooser.__init__(self, app)
		self.full = None
コード例 #37
0
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.setup_image(grid_columns=2)
コード例 #38
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     self.parser = GuiActionParser()
コード例 #39
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     self._recursing = False
     self.axes = [None, None, None]
コード例 #40
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
コード例 #41
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
コード例 #42
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     self.x = self.y = NoAction()
コード例 #43
0
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.setup_image()
コード例 #44
0
ファイル: axis_action.py プロジェクト: wendeldr/sc-controller
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbAreaType = self.builder.get_object("cbAreaType")
		cbAreaType.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
コード例 #45
0
ファイル: buttons.py プロジェクト: wiltonlazary/sc-controller
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     Chooser.__init__(self, app)
     self.axes_allowed = True
コード例 #46
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
     cbAreaType = self.builder.get_object("cbAreaType")
     cbAreaType.set_row_separator_func(
         lambda model, iter: model.get_value(iter, 0) == "-")
コード例 #47
0
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self._recursing = False
		self.parser = GuiActionParser()
コード例 #48
0
ファイル: custom.py プロジェクト: wendeldr/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self.parser = GuiActionParser()
コード例 #49
0
ファイル: trigger_ab.py プロジェクト: Micr0Bit/sc-controller
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self.half = None
		self.full = None
コード例 #50
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     self._recursing = False
     self.parser = GuiActionParser()
コード例 #51
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     BindingEditor.__init__(self, app)
     self._recursing = False
     self.actions = [NoAction()] * 6
コード例 #52
0
 def __init__(self, app, editor):
     AEComponent.__init__(self, app, editor)
     self.half = None
     self.full = None