当前位置: 首页>>代码示例>>Python>>正文


Python OSDWindow._add_arguments方法代码示例

本文整理汇总了Python中scc.osd.OSDWindow._add_arguments方法的典型用法代码示例。如果您正苦于以下问题:Python OSDWindow._add_arguments方法的具体用法?Python OSDWindow._add_arguments怎么用?Python OSDWindow._add_arguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在scc.osd.OSDWindow的用法示例。


在下文中一共展示了OSDWindow._add_arguments方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('--control-with', '-c', type=str,
			metavar="option", default=STICK, choices=(LEFT, RIGHT, STICK),
			help="which pad or stick should be used to navigate menu (default: %s)" % (STICK,))
		self.argparser.add_argument('--confirm-with', type=str,
			metavar="button", default='A',
			help="button used to confirm choice (default: A)")
		self.argparser.add_argument('--cancel-with', type=str,
			metavar="button", default='B',
			help="button used to cancel menu (default: B)")
		self.argparser.add_argument('--confirm-with-release', action='store_true',
			help="confirm choice with button release instead of button press")
		self.argparser.add_argument('--cancel-with-release', action='store_true',
			help="cancel menu with button release instead of button press")
		self.argparser.add_argument('--use-cursor', '-u', action='store_true',
			help="display and use cursor")
		self.argparser.add_argument('--from-profile', '-p', type=str,
			metavar="profile_file menu_name",
			help="load menu items from profile file")
		self.argparser.add_argument('--from-file', '-f', type=str,
			metavar="filename",
			help="load menu items from json file")
		self.argparser.add_argument('--print-items', action='store_true',
			help="prints menu items to stdout")
		self.argparser.add_argument('items', type=str, nargs='*', metavar='id title',
			help="Menu items")
开发者ID:mulark,项目名称:sc-controller,代码行数:29,代码来源:menu.py

示例2: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('--control-with', '-c', type=str,
			metavar="option", default=DEFAULT, choices=(DEFAULT, LEFT, RIGHT, STICK),
			help="which pad or stick should be used to navigate menu")
		self.argparser.add_argument('--confirm-with', type=str,
			metavar="button", default=DEFAULT,
			help="button used to confirm choice")
		self.argparser.add_argument('--cancel-with', type=str,
			metavar="button", default=DEFAULT,
			help="button used to cancel menu")
		self.argparser.add_argument('--confirm-with-release', action='store_true',
			help="confirm choice with button release instead of button press")
		self.argparser.add_argument('--cancel-with-release', action='store_true',
			help="cancel menu with button release instead of button press")
		self.argparser.add_argument('--use-cursor', '-u', action='store_true',
			help="display and use cursor")
		self.argparser.add_argument('--size', type=int,
			help="sets prefered width or height")
		self.argparser.add_argument('--feedback-amplitude', type=int,
			help="enables and sets power of feedback effect generated when active menu option is changed")
		self.argparser.add_argument('--from-profile', '-p', type=str,
			metavar="profile_file menu_name",
			help="load menu items from profile file")
		self.argparser.add_argument('--from-file', '-f', type=str,
			metavar="filename",
			help="load menu items from json file")
		self.argparser.add_argument('--print-items', action='store_true',
			help="prints menu items to stdout")
		self.argparser.add_argument('items', type=str, nargs='*', metavar='id title',
			help="Menu items")
开发者ID:kozec,项目名称:sc-controller,代码行数:33,代码来源:menu.py

示例3: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('-t', type=float, metavar="seconds",
				default=5, help="time before message is hidden (default: 5; 0 means forever)")
		self.argparser.add_argument('-s', type=int, metavar="size",
				default=3, help="font size, in range 1 to 3 (default: 3)")
		self.argparser.add_argument('text', type=str, help="text to display")
开发者ID:kozec,项目名称:sc-controller,代码行数:9,代码来源:message.py

示例4: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('image', type=str, nargs="?",
			default = self.bdisplay, help="keyboard image to use")
		self.argparser.add_argument('--cancel-with', type=str,
			metavar="button", default='B',
			help="button used to close display (default: B)")
开发者ID:kozec,项目名称:sc-controller,代码行数:9,代码来源:binding_display.py

示例5: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('--confirm-with', type=str,
			metavar="button", default=DEFAULT,
			help="button used to confirm choice")
		self.argparser.add_argument('--cancel-with', type=str,
			metavar="button", default=DEFAULT,
			help="button used to cancel dialog")
		self.argparser.add_argument('--feedback-amplitude', type=int,
			help="enables and sets power of feedback effect generated when active menu option is changed")
开发者ID:kozec,项目名称:sc-controller,代码行数:12,代码来源:launcher.py

示例6: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('--cancel-with', type=str,
			metavar="button", default='START',
			help="button used to cancel menu (default: START)")
		self.argparser.add_argument('--timeout', type=int,
			default=5,
			help="how many seconds before menu is automatically canceled")
		self.argparser.add_argument('--cancel-with-release', action='store_true',
			help="cancel menu with button release instead of button press")
		self.argparser.add_argument('--from-profile', '-p', type=str,
			metavar="profile_file menu_name",
			help="load menu items from profile file")
		self.argparser.add_argument('--from-file', '-f', type=str,
			metavar="filename",
			help="load menu items from json file")
		self.argparser.add_argument('--print-items', action='store_true',
			help="prints menu items to stdout")
		self.argparser.add_argument('items', type=str, nargs='*', metavar='id title',
			help="Menu items")
开发者ID:kozec,项目名称:sc-controller,代码行数:22,代码来源:quick_menu.py

示例7: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('-t', type=float, metavar="seconds",
				default=5, help="time before message is hidden (default: 5)")
		self.argparser.add_argument('text', type=str, help="text to display")
开发者ID:Micr0Bit,项目名称:sc-controller,代码行数:7,代码来源:message.py

示例8: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('--width', type=int, metavar="pixels", default=20,
			help="""area width in pixels""")
		self.argparser.add_argument('--height', type=int, metavar="pixels", default=-20,
			help="""area height in pixels""")
开发者ID:alwaysLearnin,项目名称:sc-controller,代码行数:8,代码来源:area.py

示例9: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('image', type=str, nargs="?",
			default = self.kbimage, help="keyboard image to use")
开发者ID:kozec,项目名称:sc-controller,代码行数:6,代码来源:keyboard.py

示例10: _add_arguments

# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
	def _add_arguments(self):
		OSDWindow._add_arguments(self)
		self.argparser.add_argument('--control-with', '-c', type=str,
			metavar="option", default=LEFT, choices=(LEFT, RIGHT),
			help="which pad should be used to generate gesture menu (default: %s)" % (LEFT,))
开发者ID:kozec,项目名称:sc-controller,代码行数:7,代码来源:gesture_display.py


注:本文中的scc.osd.OSDWindow._add_arguments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。