How to use the scc.gui.ae.AEComponent function in scc

To help you get started, we’ve selected a few scc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kozec / sc-controller / python / scc / gui / ae / tilt.py View on Github external
def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self.actions = [ NoAction() ] * 6
github kozec / sc-controller / scc / gui / ae / tilt.py View on Github external
from scc.special_actions import MenuAction
from scc.modifiers import NameModifier
from scc.uinput import Keys
from scc.gui.ae import AEComponent, describe_action
from scc.gui.ae.menu_action import MenuActionCofC
from scc.gui.binding_editor import BindingEditor
from scc.gui.action_editor import ActionEditor


import os, logging
log = logging.getLogger("AE.Tilt")

__all__ = [ 'TiltComponent' ]


class TiltComponent(AEComponent, BindingEditor):
	GLADE = "ae/tilt.glade"
	NAME = "tilt"
	CTXS = Action.AC_GYRO
	PRIORITY = 2
	
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self.actions = [ NoAction() ] * 6
	
	
	def set_action(self, mode, action):
		if isinstance(action, TiltAction):
			self.actions = list(action.actions)
			while len(self.actions) < 6:
github kozec / sc-controller / python / scc / gui / ae / dpad.py View on Github external
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
github kozec / sc-controller / scc / gui / ae / custom.py View on Github external
def load(self):
		if self.loaded : return
		AEComponent.load(self)
		try:
			txCustomAction = self.builder.get_object("txCustomAction")
			txCustomAction.set_monospace(True)
		except: pass
github kozec / sc-controller / scc / gui / ae / trigger_ab.py View on Github external
def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self.half = None
		self.full = None
github kozec / sc-controller / scc / gui / ae / gesture.py View on Github external
from scc.gui.ae import AEComponent, describe_action
from scc.gui.area_to_action import action_to_area
from scc.gui.simple_chooser import SimpleChooser
from scc.gui.action_editor import ActionEditor
from scc.gui.parser import GuiActionParser
from scc.actions import Action, NoAction, XYAction
from scc.special_actions import GesturesAction
from scc.modifiers import NameModifier

import os, logging
log = logging.getLogger("AE.PerAxis")

__all__ = [ 'GestureComponent' ]


class GestureComponent(AEComponent):
	GLADE = "ae/gesture.glade"
	NAME = "gesture"
	CTXS = Action.AC_STICK | Action.AC_PAD
	PRIORITY = 1
	
	def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		self.x = self.y = NoAction()
	
	
	def set_action(self, mode, action):
		lstGestures = self.builder.get_object("lstGestures")
		lstGestures.clear()
		if isinstance(action, GesturesAction):
			for gstr in action.gestures:
				o = GObject.GObject()
github kozec / sc-controller / python / scc / gui / ae / trigger.py View on Github external
from scc.actions import TriggerAction, ButtonAction, AxisAction, MouseAction
from scc.actions import Action, NoAction, MultiAction
from scc.actions import FeedbackModifier
from scc.gui.ae import AEComponent, describe_action
from scc.gui.area_to_action import action_to_area
from scc.gui.simple_chooser import SimpleChooser
from scc.gui.binding_editor import BindingEditor
from scc.gui.parser import InvalidAction

import os, logging
log = logging.getLogger("AE.TriggerAB")

__all__ = [ 'TriggerComponent' ]


class TriggerComponent(AEComponent, BindingEditor):
	GLADE = "ae/trigger.glade"
	NAME = "trigger"
	CTXS = Action.AC_TRIGGER
	
	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()
	
	
	def handles(self, mode, action):
		if isinstance(action, NoAction):
			return True
github kozec / sc-controller / scc / gui / ae / special_action.py View on Github external
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)  == "-" )
github kozec / sc-controller / scc / gui / action_editor.py View on Github external
def load_components(self):
		""" Loads list of editor components """
		# Import and load components
		for c in self.COMPONENTS:
			mod = importlib.import_module("scc.gui.ae.%s" % (c,))
			for x in dir(mod):
				cls = getattr(mod, x)
				if isinstance(cls, (type, types.ClassType)) and issubclass(cls, AEComponent):
					if cls is not AEComponent:
						self.components.append(cls(self.app, self))
		self._selected_component = None
github kozec / sc-controller / scc / gui / ae / tilt.py View on Github external
def __init__(self, app, editor):
		AEComponent.__init__(self, app, editor)
		BindingEditor.__init__(self, app)
		self._recursing = False
		self.actions = [ NoAction() ] * 6